diff options
-rw-r--r-- | AddressBook/GTMABAddressBook.m | 2 | ||||
-rw-r--r-- | AddressBook/GTMABAddressBook.strings | bin | 713 -> 1428 bytes | |||
-rw-r--r-- | UnitTesting/GTMSenTestCase.h | 18 | ||||
-rw-r--r-- | UnitTesting/GTMUIUnitTestingHarness/English.lproj/Localizable.strings | bin | 685 -> 1372 bytes |
4 files changed, 11 insertions, 9 deletions
diff --git a/AddressBook/GTMABAddressBook.m b/AddressBook/GTMABAddressBook.m index ec6d817..8ddb247 100644 --- a/AddressBook/GTMABAddressBook.m +++ b/AddressBook/GTMABAddressBook.m @@ -827,7 +827,7 @@ typedef struct { isEqual = multiValue_ == [object multiValueRef]; if (!isEqual) { NSUInteger count = [self count]; - NSUInteger objCount = [object count]; + NSUInteger objCount = [(GTMABMultiValue *)object count]; isEqual = count == objCount; for (NSUInteger i = 0; isEqual && i < count; ++i) { NSString *label = [self labelAtIndex:i]; diff --git a/AddressBook/GTMABAddressBook.strings b/AddressBook/GTMABAddressBook.strings Binary files differindex 370f566..b5e010e 100644 --- a/AddressBook/GTMABAddressBook.strings +++ b/AddressBook/GTMABAddressBook.strings diff --git a/UnitTesting/GTMSenTestCase.h b/UnitTesting/GTMSenTestCase.h index 4c372c7..3ed752a 100644 --- a/UnitTesting/GTMSenTestCase.h +++ b/UnitTesting/GTMSenTestCase.h @@ -316,8 +316,8 @@ ({ \ NSString *_failure = nil; \ @try { \ - id _a1value = (a1); \ - id _a2value = (a2); \ + NSString *_a1value = (a1); \ + NSString *_a2value = (a2); \ NSComparisonResult _result; \ if (![_a1value isKindOfClass:[NSString class]]) { \ _failure = [NSString stringWithFormat:@"(%@) is not an NSString* (%@)", @#a1, [_a1value class]]; \ @@ -356,8 +356,8 @@ ({ \ NSString *_failure = nil; \ @try { \ - id _a1value = (a1); \ - id _a2value = (a2); \ + NSString *_a1value = (a1); \ + NSString *_a2value = (a2); \ NSComparisonResult _result; \ if (![_a1value isKindOfClass:[NSString class]]) { \ _failure = [NSString stringWithFormat:@"(%@) is not an NSString* (%@)", @#a1, [_a1value class]]; \ @@ -394,18 +394,20 @@ @try { \ const char* _a1value = (a1); \ const char* _a2value = (a2); \ - if (_a1value != _a2value && strcmp(_a1value, _a2value) != 0) { \ - _failure = @""; \ + if (_a1value != _a2value && \ + (_a1value == NULL || _a2value == NULL || strcmp(_a1value, _a2value) != 0)) { \ + _failure = [NSString stringWithFormat:@"strcmp(\"%s\", \"%s\") != 0", _a1value, _a2value]; \ }\ } \ @catch (NSException *_exception) { \ _failure = [NSString stringWithFormat:@": " _XCExceptionFormatString, [_exception reason]]; \ } \ @catch (...) { \ - _failure = @": "_XCUnknownExceptionString; \ + _failure = @": " _XCUnknownExceptionString; \ } \ if (_failure) { \ - NSString *_expression = [NSString stringWithFormat:@"((%s) == (%s) failed%@", @#a1, @#a2, _failure]; \ + NSString *_expression = [NSString stringWithFormat:@"((%@) vs. (%@) failed: %@", \ + GTM_NSSTRINGIFY(a1), GTM_NSSTRINGIFY(a2), _failure]; \ _GTMXCRegisterFailure(_expression, format); \ } \ }) diff --git a/UnitTesting/GTMUIUnitTestingHarness/English.lproj/Localizable.strings b/UnitTesting/GTMUIUnitTestingHarness/English.lproj/Localizable.strings Binary files differindex 567e3f7..6eb49a5 100644 --- a/UnitTesting/GTMUIUnitTestingHarness/English.lproj/Localizable.strings +++ b/UnitTesting/GTMUIUnitTestingHarness/English.lproj/Localizable.strings |