From 9ba2e321409a3f656cd9bf2b5fb6c8b1f06fad4e Mon Sep 17 00:00:00 2001 From: "gtm.daemon" Date: Tue, 28 Jul 2009 00:45:18 +0000 Subject: [Author: dmaclach] Fixes up some warnings that were being generated when compiling with the 4.2 compiler. Also cleans up code to look prettier. DELTA=111 (0 added, 0 deleted, 111 changed) R=thomasvl --- UnitTesting/GTMSenTestCase.h | 222 +++++++++++++++++++++---------------------- 1 file changed, 111 insertions(+), 111 deletions(-) (limited to 'UnitTesting/GTMSenTestCase.h') diff --git a/UnitTesting/GTMSenTestCase.h b/UnitTesting/GTMSenTestCase.h index 8d72a48..3b4dcab 100644 --- a/UnitTesting/GTMSenTestCase.h +++ b/UnitTesting/GTMSenTestCase.h @@ -75,25 +75,25 @@ NSString *STComposeString(NSString *, ...); // ...: A variable number of arguments to the format string. Can be absent. #define STAssertNoErr(a1, description, ...) \ do { \ - @try {\ + @try { \ OSStatus a1value = (a1); \ if (a1value != noErr) { \ NSString *_expression = [NSString stringWithFormat:@"Expected noErr, got %ld for (%s)", a1value, #a1]; \ - if (description) { \ + if (description != nil) { \ _expression = [NSString stringWithFormat:@"%@: %@", _expression, STComposeString(description, ##__VA_ARGS__)]; \ } \ [self failWithException:[NSException failureInFile:[NSString stringWithUTF8String:__FILE__] \ atLine:__LINE__ \ withDescription:_expression]]; \ } \ - }\ - @catch (id anException) {\ + } \ + @catch (id anException) { \ [self failWithException:[NSException failureInRaise:[NSString stringWithFormat:@"(%s) == noErr fails", #a1] \ exception:anException \ inFile:[NSString stringWithUTF8String:__FILE__] \ atLine:__LINE__ \ withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ + } \ } while(0) // Generates a failure when a1 != a2 @@ -105,26 +105,26 @@ do { \ // ...: A variable number of arguments to the format string. Can be absent. #define STAssertErr(a1, a2, description, ...) \ do { \ - @try {\ + @try { \ OSStatus a1value = (a1); \ OSStatus a2value = (a2); \ if (a1value != a2value) { \ NSString *_expression = [NSString stringWithFormat:@"Expected %s(%ld) but got %ld for (%s)", #a2, a2value, a1value, #a1]; \ - if (description) { \ + if (description != nil) { \ _expression = [NSString stringWithFormat:@"%@: %@", _expression, STComposeString(description, ##__VA_ARGS__)]; \ } \ [self failWithException:[NSException failureInFile:[NSString stringWithUTF8String:__FILE__] \ atLine:__LINE__ \ withDescription:_expression]]; \ } \ - }\ - @catch (id anException) {\ + } \ + @catch (id anException) { \ [self failWithException:[NSException failureInRaise:[NSString stringWithFormat:@"(%s) == (%s) fails", #a1, #a2] \ exception:anException \ inFile:[NSString stringWithUTF8String:__FILE__] \ atLine:__LINE__ \ withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ + } \ } while(0) @@ -136,25 +136,25 @@ do { \ // ...: A variable number of arguments to the format string. Can be absent. #define STAssertNotNULL(a1, description, ...) \ do { \ - @try {\ + @try { \ const void* a1value = (a1); \ if (a1value == NULL) { \ NSString *_expression = [NSString stringWithFormat:@"(%s) != NULL", #a1]; \ - if (description) { \ + if (description != nil) { \ _expression = [NSString stringWithFormat:@"%@: %@", _expression, STComposeString(description, ##__VA_ARGS__)]; \ } \ [self failWithException:[NSException failureInFile:[NSString stringWithUTF8String:__FILE__] \ atLine:__LINE__ \ withDescription:_expression]]; \ } \ - }\ - @catch (id anException) {\ + } \ + @catch (id anException) { \ [self failWithException:[NSException failureInRaise:[NSString stringWithFormat:@"(%s) != NULL fails", #a1] \ exception:anException \ inFile:[NSString stringWithUTF8String:__FILE__] \ atLine:__LINE__ \ withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ + } \ } while(0) // Generates a failure when a1 is not NULL @@ -165,25 +165,25 @@ do { \ // ...: A variable number of arguments to the format string. Can be absent. #define STAssertNULL(a1, description, ...) \ do { \ - @try {\ + @try { \ const void* a1value = (a1); \ if (a1value != NULL) { \ NSString *_expression = [NSString stringWithFormat:@"(%s) == NULL", #a1]; \ - if (description) { \ + if (description != nil) { \ _expression = [NSString stringWithFormat:@"%@: %@", _expression, STComposeString(description, ##__VA_ARGS__)]; \ } \ [self failWithException:[NSException failureInFile:[NSString stringWithUTF8String:__FILE__] \ atLine:__LINE__ \ withDescription:_expression]]; \ } \ - }\ - @catch (id anException) {\ + } \ + @catch (id anException) { \ [self failWithException:[NSException failureInRaise:[NSString stringWithFormat:@"(%s) == NULL fails", #a1] \ exception:anException \ inFile:[NSString stringWithUTF8String:__FILE__] \ atLine:__LINE__ \ withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ + } \ } while(0) // Generates a failure when a1 is equal to a2. This test is for C scalars, @@ -196,7 +196,7 @@ do { \ // ...: A variable number of arguments to the format string. Can be absent. #define STAssertNotEquals(a1, a2, description, ...) \ do { \ - @try {\ + @try { \ if (@encode(__typeof__(a1)) != @encode(__typeof__(a2))) { \ [self failWithException:[NSException failureInFile:[NSString stringWithUTF8String:__FILE__] \ atLine:__LINE__ \ @@ -208,7 +208,7 @@ do { \ NSValue *a2encoded = [NSValue value:&a2value withObjCType:@encode(__typeof__(a2))]; \ if ([a1encoded isEqualToValue:a2encoded]) { \ NSString *_expression = [NSString stringWithFormat:@"(%s) != (%s)", #a1, #a2]; \ - if (description) { \ + if (description != nil) { \ _expression = [NSString stringWithFormat:@"%@: %@", _expression, STComposeString(description, ##__VA_ARGS__)]; \ } \ [self failWithException:[NSException failureInFile:[NSString stringWithUTF8String:__FILE__] \ @@ -217,13 +217,13 @@ do { \ } \ } \ } \ - @catch (id anException) {\ + @catch (id anException) { \ [self failWithException:[NSException failureInRaise:[NSString stringWithFormat:@"(%s) != (%s)", #a1, #a2] \ exception:anException \ inFile:[NSString stringWithUTF8String:__FILE__] \ atLine:__LINE__ \ withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ + } \ } while(0) // Generates a failure when a1 is equal to a2. This test is for objects. @@ -235,27 +235,27 @@ do { \ // ...: A variable number of arguments to the format string. Can be absent. #define STAssertNotEqualObjects(a1, a2, desc, ...) \ do { \ - @try {\ + @try { \ id a1value = (a1); \ id a2value = (a2); \ if ( (@encode(__typeof__(a1value)) == @encode(id)) && \ (@encode(__typeof__(a2value)) == @encode(id)) && \ ![(id)a1value isEqual:(id)a2value] ) continue; \ NSString *_expression = [NSString stringWithFormat:@"%s('%@') != %s('%@')", #a1, [a1 description], #a2, [a2 description]]; \ - if (desc) { \ + if (desc != nil) { \ _expression = [NSString stringWithFormat:@"%@: %@", _expression, STComposeString(desc, ##__VA_ARGS__)]; \ } \ [self failWithException:[NSException failureInFile:[NSString stringWithUTF8String:__FILE__] \ atLine:__LINE__ \ withDescription:_expression]]; \ - }\ - @catch (id anException) {\ + } \ + @catch (id anException) { \ [self failWithException:[NSException failureInRaise:[NSString stringWithFormat: @"(%s) != (%s)", #a1, #a2] \ exception:anException \ inFile:[NSString stringWithUTF8String:__FILE__] \ atLine:__LINE__ \ withDescription:STComposeString(desc, ##__VA_ARGS__)]]; \ - }\ + } \ } while(0) // Generates a failure when a1 is not 'op' to a2. This test is for C scalars. @@ -268,7 +268,7 @@ do { \ // ...: A variable number of arguments to the format string. Can be absent. #define STAssertOperation(a1, a2, op, description, ...) \ do { \ - @try {\ + @try { \ if (@encode(__typeof__(a1)) != @encode(__typeof__(a2))) { \ [self failWithException:[NSException failureInFile:[NSString stringWithUTF8String:__FILE__] \ atLine:__LINE__ \ @@ -280,7 +280,7 @@ do { \ double a1DoubleValue = a1value; \ double a2DoubleValue = a2value; \ NSString *_expression = [NSString stringWithFormat:@"%s (%lg) %s %s (%lg)", #a1, a1DoubleValue, #op, #a2, a2DoubleValue]; \ - if (description) { \ + if (description != nil) { \ _expression = [NSString stringWithFormat:@"%@: %@", _expression, STComposeString(description, ##__VA_ARGS__)]; \ } \ [self failWithException:[NSException failureInFile:[NSString stringWithUTF8String:__FILE__] \ @@ -289,14 +289,14 @@ do { \ } \ } \ } \ - @catch (id anException) {\ + @catch (id anException) { \ [self failWithException:[NSException \ failureInRaise:[NSString stringWithFormat:@"(%s) %s (%s)", #a1, #op, #a2] \ exception:anException \ inFile:[NSString stringWithUTF8String:__FILE__] \ atLine:__LINE__ \ withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ + } \ } while(0) // Generates a failure when a1 is not > a2. This test is for C scalars. @@ -356,7 +356,7 @@ do { \ // ...: A variable number of arguments to the format string. Can be absent. #define STAssertEqualStrings(a1, a2, description, ...) \ do { \ - @try {\ + @try { \ id a1value = (a1); \ id a2value = (a2); \ if (a1value == a2value) continue; \ @@ -368,14 +368,14 @@ do { \ inFile: [NSString stringWithUTF8String:__FILE__] \ atLine: __LINE__ \ withDescription: STComposeString(description, ##__VA_ARGS__)]]; \ - }\ - @catch (id anException) {\ + } \ + @catch (id anException) { \ [self failWithException:[NSException failureInRaise:[NSString stringWithFormat: @"(%s) == (%s)", #a1, #a2] \ exception:anException \ inFile:[NSString stringWithUTF8String:__FILE__] \ atLine:__LINE__ \ withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ + } \ } while(0) // Generates a failure when string a1 is equal to string a2. This call @@ -391,7 +391,7 @@ do { \ // ...: A variable number of arguments to the format string. Can be absent. #define STAssertNotEqualStrings(a1, a2, description, ...) \ do { \ - @try {\ + @try { \ id a1value = (a1); \ id a2value = (a2); \ if ([a1value isKindOfClass:[NSString class]] && \ @@ -402,14 +402,14 @@ do { \ inFile: [NSString stringWithUTF8String:__FILE__] \ atLine: __LINE__ \ withDescription: STComposeString(description, ##__VA_ARGS__)]]; \ - }\ - @catch (id anException) {\ + } \ + @catch (id anException) { \ [self failWithException:[NSException failureInRaise:[NSString stringWithFormat: @"(%s) != (%s)", #a1, #a2] \ exception:anException \ inFile:[NSString stringWithUTF8String:__FILE__] \ atLine:__LINE__ \ withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ + } \ } while(0) // Generates a failure when c-string a1 is not equal to c-string a2. @@ -421,7 +421,7 @@ do { \ // ...: A variable number of arguments to the format string. Can be absent. #define STAssertEqualCStrings(a1, a2, description, ...) \ do { \ - @try {\ + @try { \ const char* a1value = (a1); \ const char* a2value = (a2); \ if (a1value == a2value) continue; \ @@ -431,14 +431,14 @@ do { \ inFile: [NSString stringWithUTF8String:__FILE__] \ atLine: __LINE__ \ withDescription: STComposeString(description, ##__VA_ARGS__)]]; \ - }\ - @catch (id anException) {\ + } \ + @catch (id anException) { \ [self failWithException:[NSException failureInRaise:[NSString stringWithFormat: @"(%s) == (%s)", #a1, #a2] \ exception:anException \ inFile:[NSString stringWithUTF8String:__FILE__] \ atLine:__LINE__ \ withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ + } \ } while(0) // Generates a failure when c-string a1 is equal to c-string a2. @@ -450,7 +450,7 @@ do { \ // ...: A variable number of arguments to the format string. Can be absent. #define STAssertNotEqualCStrings(a1, a2, description, ...) \ do { \ - @try {\ + @try { \ const char* a1value = (a1); \ const char* a2value = (a2); \ if (strcmp(a1value, a2value) != 0) continue; \ @@ -459,14 +459,14 @@ do { \ inFile: [NSString stringWithUTF8String:__FILE__] \ atLine: __LINE__ \ withDescription: STComposeString(description, ##__VA_ARGS__)]]; \ - }\ - @catch (id anException) {\ + } \ + @catch (id anException) { \ [self failWithException:[NSException failureInRaise:[NSString stringWithFormat: @"(%s) != (%s)", #a1, #a2] \ exception:anException \ inFile:[NSString stringWithUTF8String:__FILE__] \ atLine:__LINE__ \ withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ + } \ } while(0) #if GTM_IPHONE_SDK @@ -482,7 +482,7 @@ do { \ "*/ #define STAssertEqualObjects(a1, a2, description, ...) \ do { \ - @try {\ + @try { \ id a1value = (a1); \ id a2value = (a2); \ if (a1value == a2value) continue; \ @@ -494,14 +494,14 @@ do { \ inFile: [NSString stringWithUTF8String:__FILE__] \ atLine: __LINE__ \ withDescription: STComposeString(description, ##__VA_ARGS__)]]; \ - }\ - @catch (id anException) {\ + } \ + @catch (id anException) { \ [self failWithException:[NSException failureInRaise:[NSString stringWithFormat: @"(%s) == (%s)", #a1, #a2] \ exception:anException \ inFile:[NSString stringWithUTF8String:__FILE__] \ atLine:__LINE__ \ withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ + } \ } while(0) @@ -515,7 +515,7 @@ do { \ "*/ #define STAssertEquals(a1, a2, description, ...) \ do { \ - @try {\ + @try { \ if (@encode(__typeof__(a1)) != @encode(__typeof__(a2))) { \ [self failWithException:[NSException failureInFile:[NSString stringWithUTF8String:__FILE__] \ atLine:__LINE__ \ @@ -535,13 +535,13 @@ do { \ } \ } \ } \ - @catch (id anException) {\ + @catch (id anException) { \ [self failWithException:[NSException failureInRaise:[NSString stringWithFormat: @"(%s) == (%s)", #a1, #a2] \ exception:anException \ inFile:[NSString stringWithUTF8String:__FILE__] \ atLine:__LINE__ \ withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ + } \ } while(0) #define STAbsoluteDifference(left,right) (MAX(left,right)-MIN(left,right)) @@ -561,7 +561,7 @@ do { \ #define STAssertEqualsWithAccuracy(a1, a2, accuracy, description, ...) \ do { \ - @try {\ + @try { \ if (@encode(__typeof__(a1)) != @encode(__typeof__(a2))) { \ [self failWithException:[NSException failureInFile:[NSString stringWithUTF8String:__FILE__] \ atLine:__LINE__ \ @@ -583,13 +583,13 @@ do { \ } \ } \ } \ - @catch (id anException) {\ + @catch (id anException) { \ [self failWithException:[NSException failureInRaise:[NSString stringWithFormat: @"(%s) == (%s)", #a1, #a2] \ exception:anException \ inFile:[NSString stringWithUTF8String:__FILE__] \ atLine:__LINE__ \ withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ + } \ } while(0) @@ -614,7 +614,7 @@ do { \ "*/ #define STAssertNil(a1, description, ...) \ do { \ - @try {\ + @try { \ id a1value = (a1); \ if (a1value != nil) { \ NSString *_a1 = [NSString stringWithUTF8String: #a1]; \ @@ -625,14 +625,14 @@ do { \ atLine: __LINE__ \ withDescription: STComposeString(description, ##__VA_ARGS__)]]; \ } \ - }\ - @catch (id anException) {\ + } \ + @catch (id anException) { \ [self failWithException:[NSException failureInRaise:[NSString stringWithFormat: @"(%s) == nil fails", #a1] \ exception:anException \ inFile:[NSString stringWithUTF8String:__FILE__] \ atLine:__LINE__ \ withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ + } \ } while(0) @@ -644,7 +644,7 @@ do { \ "*/ #define STAssertNotNil(a1, description, ...) \ do { \ - @try {\ + @try { \ id a1value = (a1); \ if (a1value == nil) { \ NSString *_a1 = [NSString stringWithUTF8String: #a1]; \ @@ -655,14 +655,14 @@ do { \ atLine: __LINE__ \ withDescription: STComposeString(description, ##__VA_ARGS__)]]; \ } \ - }\ - @catch (id anException) {\ + } \ + @catch (id anException) { \ [self failWithException:[NSException failureInRaise:[NSString stringWithFormat: @"(%s) != nil fails", #a1] \ exception:anException \ inFile:[NSString stringWithUTF8String:__FILE__] \ atLine:__LINE__ \ withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ + } \ } while(0) @@ -674,9 +674,9 @@ do { \ "*/ #define STAssertTrue(expr, description, ...) \ do { \ - BOOL _evaluatedExpression = (expr);\ - if (!_evaluatedExpression) {\ - NSString *_expression = [NSString stringWithUTF8String: #expr];\ + BOOL _evaluatedExpression = (expr); \ + if (!_evaluatedExpression) { \ + NSString *_expression = [NSString stringWithUTF8String: #expr]; \ [self failWithException:[NSException failureInCondition: _expression \ isTrue: NO \ inFile: [NSString stringWithUTF8String:__FILE__] \ @@ -695,10 +695,10 @@ do { \ "*/ #define STAssertTrueNoThrow(expr, description, ...) \ do { \ - @try {\ - BOOL _evaluatedExpression = (expr);\ - if (!_evaluatedExpression) {\ - NSString *_expression = [NSString stringWithUTF8String: #expr];\ + @try { \ + BOOL _evaluatedExpression = (expr); \ + if (!_evaluatedExpression) { \ + NSString *_expression = [NSString stringWithUTF8String: #expr]; \ [self failWithException:[NSException failureInCondition: _expression \ isTrue: NO \ inFile: [NSString stringWithUTF8String:__FILE__] \ @@ -706,13 +706,13 @@ do { \ withDescription: STComposeString(description, ##__VA_ARGS__)]]; \ } \ } \ - @catch (id anException) {\ + @catch (id anException) { \ [self failWithException:[NSException failureInRaise:[NSString stringWithFormat: @"(%s) ", #expr] \ exception:anException \ inFile:[NSString stringWithUTF8String:__FILE__] \ atLine:__LINE__ \ withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ + } \ } while (0) @@ -724,9 +724,9 @@ do { \ "*/ #define STAssertFalse(expr, description, ...) \ do { \ - BOOL _evaluatedExpression = (expr);\ - if (_evaluatedExpression) {\ - NSString *_expression = [NSString stringWithUTF8String: #expr];\ + BOOL _evaluatedExpression = (expr); \ + if (_evaluatedExpression) { \ + NSString *_expression = [NSString stringWithUTF8String: #expr]; \ [self failWithException:[NSException failureInCondition: _expression \ isTrue: YES \ inFile: [NSString stringWithUTF8String:__FILE__] \ @@ -745,10 +745,10 @@ do { \ "*/ #define STAssertFalseNoThrow(expr, description, ...) \ do { \ - @try {\ - BOOL _evaluatedExpression = (expr);\ - if (_evaluatedExpression) {\ - NSString *_expression = [NSString stringWithUTF8String: #expr];\ + @try { \ + BOOL _evaluatedExpression = (expr); \ + if (_evaluatedExpression) { \ + NSString *_expression = [NSString stringWithUTF8String: #expr]; \ [self failWithException:[NSException failureInCondition: _expression \ isTrue: YES \ inFile: [NSString stringWithUTF8String:__FILE__] \ @@ -756,13 +756,13 @@ do { \ withDescription: STComposeString(description, ##__VA_ARGS__)]]; \ } \ } \ - @catch (id anException) {\ + @catch (id anException) { \ [self failWithException:[NSException failureInRaise:[NSString stringWithFormat: @"!(%s) ", #expr] \ exception:anException \ inFile:[NSString stringWithUTF8String:__FILE__] \ atLine:__LINE__ \ withDescription:STComposeString(description, ##__VA_ARGS__)]]; \ - }\ + } \ } while (0) @@ -775,11 +775,11 @@ do { \ #define STAssertThrows(expr, description, ...) \ do { \ @try { \ - (expr);\ + (expr); \ } \ @catch (id anException) { \ continue; \ - }\ + } \ [self failWithException:[NSException failureInRaise: [NSString stringWithUTF8String:#expr] \ exception: nil \ inFile: [NSString stringWithUTF8String:__FILE__] \ @@ -799,21 +799,21 @@ do { \ #define STAssertThrowsSpecific(expr, specificException, description, ...) \ do { \ @try { \ - (expr);\ + (expr); \ } \ @catch (specificException *anException) { \ continue; \ - }\ - @catch (id anException) {\ - NSString *_descrip = STComposeString(@"(Expected exception: %@) %@", NSStringFromClass([specificException class]), description);\ + } \ + @catch (id anException) { \ + NSString *_descrip = STComposeString(@"(Expected exception: %@) %@", NSStringFromClass([specificException class]), description); \ [self failWithException:[NSException failureInRaise: [NSString stringWithUTF8String:#expr] \ exception: anException \ inFile: [NSString stringWithUTF8String:__FILE__] \ atLine: __LINE__ \ withDescription: STComposeString(_descrip, ##__VA_ARGS__)]]; \ continue; \ - }\ - NSString *_descrip = STComposeString(@"(Expected exception: %@) %@", NSStringFromClass([specificException class]), description);\ + } \ + NSString *_descrip = STComposeString(@"(Expected exception: %@) %@", NSStringFromClass([specificException class]), description); \ [self failWithException:[NSException failureInRaise: [NSString stringWithUTF8String:#expr] \ exception: nil \ inFile: [NSString stringWithUTF8String:__FILE__] \ @@ -837,11 +837,11 @@ do { \ #define STAssertThrowsSpecificNamed(expr, specificException, aName, description, ...) \ do { \ @try { \ - (expr);\ + (expr); \ } \ @catch (specificException *anException) { \ if ([aName isEqualToString: [anException name]]) continue; \ - NSString *_descrip = STComposeString(@"(Expected exception: %@ (name: %@)) %@", NSStringFromClass([specificException class]), aName, description);\ + NSString *_descrip = STComposeString(@"(Expected exception: %@ (name: %@)) %@", NSStringFromClass([specificException class]), aName, description); \ [self failWithException: \ [NSException failureInRaise: [NSString stringWithUTF8String:#expr] \ exception: anException \ @@ -849,9 +849,9 @@ do { \ atLine: __LINE__ \ withDescription: STComposeString(_descrip, ##__VA_ARGS__)]]; \ continue; \ - }\ - @catch (id anException) {\ - NSString *_descrip = STComposeString(@"(Expected exception: %@) %@", NSStringFromClass([specificException class]), description);\ + } \ + @catch (id anException) { \ + NSString *_descrip = STComposeString(@"(Expected exception: %@) %@", NSStringFromClass([specificException class]), description); \ [self failWithException: \ [NSException failureInRaise: [NSString stringWithUTF8String:#expr] \ exception: anException \ @@ -859,8 +859,8 @@ do { \ atLine: __LINE__ \ withDescription: STComposeString(_descrip, ##__VA_ARGS__)]]; \ continue; \ - }\ - NSString *_descrip = STComposeString(@"(Expected exception: %@) %@", NSStringFromClass([specificException class]), description);\ + } \ + NSString *_descrip = STComposeString(@"(Expected exception: %@) %@", NSStringFromClass([specificException class]), description); \ [self failWithException: \ [NSException failureInRaise: [NSString stringWithUTF8String:#expr] \ exception: nil \ @@ -879,7 +879,7 @@ do { \ #define STAssertNoThrow(expr, description, ...) \ do { \ @try { \ - (expr);\ + (expr); \ } \ @catch (id anException) { \ [self failWithException:[NSException failureInRaise: [NSString stringWithUTF8String:#expr] \ @@ -887,7 +887,7 @@ do { \ inFile: [NSString stringWithUTF8String:__FILE__] \ atLine: __LINE__ \ withDescription: STComposeString(description, ##__VA_ARGS__)]]; \ - }\ + } \ } while (0) @@ -902,7 +902,7 @@ do { \ #define STAssertNoThrowSpecific(expr, specificException, description, ...) \ do { \ @try { \ - (expr);\ + (expr); \ } \ @catch (specificException *anException) { \ [self failWithException:[NSException failureInRaise: [NSString stringWithUTF8String:#expr] \ @@ -910,10 +910,10 @@ do { \ inFile: [NSString stringWithUTF8String:__FILE__] \ atLine: __LINE__ \ withDescription: STComposeString(description, ##__VA_ARGS__)]]; \ - }\ - @catch (id anythingElse) {\ + } \ + @catch (id anythingElse) { \ ; \ - }\ + } \ } while (0) @@ -932,11 +932,11 @@ do { \ #define STAssertNoThrowSpecificNamed(expr, specificException, aName, description, ...) \ do { \ @try { \ - (expr);\ + (expr); \ } \ @catch (specificException *anException) { \ if ([aName isEqualToString: [anException name]]) { \ - NSString *_descrip = STComposeString(@"(Expected exception: %@ (name: %@)) %@", NSStringFromClass([specificException class]), aName, description);\ + NSString *_descrip = STComposeString(@"(Expected exception: %@ (name: %@)) %@", NSStringFromClass([specificException class]), aName, description); \ [self failWithException: \ [NSException failureInRaise: [NSString stringWithUTF8String:#expr] \ exception: anException \ @@ -945,10 +945,10 @@ do { \ withDescription: STComposeString(_descrip, ##__VA_ARGS__)]]; \ } \ continue; \ - }\ - @catch (id anythingElse) {\ + } \ + @catch (id anythingElse) { \ ; \ - }\ + } \ } while (0) -- cgit v1.2.3