diff options
author | thomasvl@gmail.com <thomasvl@gmail.com@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2009-03-11 17:24:33 +0000 |
---|---|---|
committer | thomasvl@gmail.com <thomasvl@gmail.com@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2009-03-11 17:24:33 +0000 |
commit | 483e8d866b40a298fcc28f7a8b670ff74f11c5ab (patch) | |
tree | 5582fa69ad5301c450e213db2cd36d7727af60f2 /UnitTesting | |
parent | a5ada143459a5858341030c33180b36f7542e4d1 (diff) |
- increase some test coverage
- fixed system include in GTMTheme
- put the logging of execected dev logs under env control and default it to
off to make unittest output a little easier to read.
Diffstat (limited to 'UnitTesting')
-rw-r--r-- | UnitTesting/GTMUnitTestDevLog.h | 3 | ||||
-rw-r--r-- | UnitTesting/GTMUnitTestDevLog.m | 9 |
2 files changed, 11 insertions, 1 deletions
diff --git a/UnitTesting/GTMUnitTestDevLog.h b/UnitTesting/GTMUnitTestDevLog.h index d88ef2e..30c7077 100644 --- a/UnitTesting/GTMUnitTestDevLog.h +++ b/UnitTesting/GTMUnitTestDevLog.h @@ -27,6 +27,9 @@ // test to spit out, and it will cause any that don't match to appear as errors // in your unittest run output. You can match on exact strings or standard // regexps. +// Set GTM_SHOW_UNITTEST_DEVLOGS in the environment to show the logs that that +// are expected and encountered. Otherwise they aren't display to keep the +// unit test results easier to read. @interface GTMUnitTestDevLog : NSObject // Log a message diff --git a/UnitTesting/GTMUnitTestDevLog.m b/UnitTesting/GTMUnitTestDevLog.m index 35e29ae..f2f9418 100644 --- a/UnitTesting/GTMUnitTestDevLog.m +++ b/UnitTesting/GTMUnitTestDevLog.m @@ -177,7 +177,14 @@ static BOOL gTrackingEnabled = NO; format:@"Unexpected log: %@", logString]; } } else { - NSLog(@"Expected Log: %@", logString); + static BOOL envChecked = NO; + static BOOL showExpectedLogs = YES; + if (!envChecked) { + showExpectedLogs = getenv("GTM_SHOW_UNITTEST_DEVLOGS") ? YES : NO; + } + if (showExpectedLogs) { + NSLog(@"Expected Log: %@", logString); + } } } } else { |