aboutsummaryrefslogtreecommitdiff
path: root/UnitTesting/GTMUnitTestDevLog.m
diff options
context:
space:
mode:
Diffstat (limited to 'UnitTesting/GTMUnitTestDevLog.m')
-rw-r--r--UnitTesting/GTMUnitTestDevLog.m9
1 files changed, 6 insertions, 3 deletions
diff --git a/UnitTesting/GTMUnitTestDevLog.m b/UnitTesting/GTMUnitTestDevLog.m
index fd90396..7a12bb0 100644
--- a/UnitTesting/GTMUnitTestDevLog.m
+++ b/UnitTesting/GTMUnitTestDevLog.m
@@ -61,6 +61,8 @@ static inline void GTMInstallDebugAssertOutputHandler(void) {};
static inline void GTMUninstallDebugAssertOutputHandler(void) {};
#endif // GTM_IPHONE_SDK
+NSString *const GTMLogFailureException = @"GTMLogFailureException";
+
@interface GTMUnttestDevLogAssertionHandler : NSAssertionHandler
@end
@@ -182,12 +184,13 @@ static BOOL gTrackingEnabled = NO;
[patterns removeObjectAtIndex:0];
}
if (logError) {
+
if (regex) {
- [NSException raise:SenTestFailureException
+ [NSException raise:GTMLogFailureException
format:@"Unexpected log: %@\nExpected: %@",
logString, regex];
} else {
- [NSException raise:SenTestFailureException
+ [NSException raise:GTMLogFailureException
format:@"Unexpected log: %@", logString];
}
} else {
@@ -262,7 +265,7 @@ casesOfPattern:(NSString*)format
if ([patterns count] > 0) {
NSMutableArray *patternsCopy = [[patterns copy] autorelease];
[self resetExpectedLogs];
- [NSException raise:SenTestFailureException
+ [NSException raise:GTMLogFailureException
format:@"Logs still expected %@", patternsCopy];
}
}