diff options
author | thomasvl@gmail.com <thomasvl@gmail.com@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2008-10-23 20:52:34 +0000 |
---|---|---|
committer | thomasvl@gmail.com <thomasvl@gmail.com@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2008-10-23 20:52:34 +0000 |
commit | 750b28c89618586a0450cacb86e28cd709374c9d (patch) | |
tree | 86fa9ecee14bb5d6487f935092a1b965fd4f8a39 /iPhone/GTMABAddressBookTest.m | |
parent | 11938e47355bfbf3b81f1ff5b15f1222b83d4f47 (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.m | 23 |
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]; |