aboutsummaryrefslogtreecommitdiff
path: root/iPhone/GTMABAddressBookTest.m
diff options
context:
space:
mode:
authorGravatar thomasvl@gmail.com <thomasvl@gmail.com@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2008-10-23 20:52:34 +0000
committerGravatar thomasvl@gmail.com <thomasvl@gmail.com@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2008-10-23 20:52:34 +0000
commit750b28c89618586a0450cacb86e28cd709374c9d (patch)
tree86fa9ecee14bb5d6487f935092a1b965fd4f8a39 /iPhone/GTMABAddressBookTest.m
parent11938e47355bfbf3b81f1ff5b15f1222b83d4f47 (diff)
- Update iphone address book radars.
- Fix for issue 7 GTMABMutableMultiValue instantiation returns nil.
Diffstat (limited to 'iPhone/GTMABAddressBookTest.m')
-rw-r--r--iPhone/GTMABAddressBookTest.m23
1 files changed, 23 insertions, 0 deletions
diff --git a/iPhone/GTMABAddressBookTest.m b/iPhone/GTMABAddressBookTest.m
index 29f46a6..17a3096 100644
--- a/iPhone/GTMABAddressBookTest.m
+++ b/iPhone/GTMABAddressBookTest.m
@@ -356,6 +356,29 @@
= [[[GTMABMutableMultiValue alloc]
initWithMultiValue:nil] autorelease];
STAssertNil(mutValue, nil);
+ const ABPropertyType types[] = {
+ kABStringPropertyType,
+ kABIntegerPropertyType,
+ kABRealPropertyType,
+ kABDateTimePropertyType,
+ kABDictionaryPropertyType,
+ kABMultiStringPropertyType,
+ kABMultiIntegerPropertyType,
+ kABMultiRealPropertyType,
+ kABMultiDateTimePropertyType,
+ kABMultiDictionaryPropertyType
+ };
+ for (size_t i = 0; i < sizeof(types) / sizeof(ABPropertyType); ++i) {
+ mutValue = [GTMABMutableMultiValue valueWithPropertyType:types[i]];
+ STAssertNotNil(mutValue, nil);
+ // Oddly the Apple APIs allow you to create a mutable multi value with
+ // either a property type of kABFooPropertyType or kABMultiFooPropertyType
+ // and apparently you get back basically the same thing. However if you
+ // ask a type that you created with kABMultiFooPropertyType for it's type
+ // it returns just kABFooPropertyType.
+ STAssertEquals([mutValue propertyType],
+ types[i] & ~kABMultiValueMask, nil);
+ }
mutValue = [GTMABMutableMultiValue valueWithPropertyType:kABStringPropertyType];
STAssertNotNil(mutValue, nil);
value = [[mutValue copy] autorelease];