aboutsummaryrefslogtreecommitdiff
path: root/UnitTesting/GTMSenTestCase.m
diff options
context:
space:
mode:
authorGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2009-03-27 17:15:24 +0000
committerGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2009-03-27 17:15:24 +0000
commite3c268753ab7a8cf62bdf66d64d86707a850a933 (patch)
tree24c0380f59a0ec0d5f9999e53ea634c0b1b974c1 /UnitTesting/GTMSenTestCase.m
parent6545da262e160fc959e1fe869c517daeff1e184e (diff)
[Author: dmaclach]
Change build script so that it removes all of the gcda files for the current config project wide, which in general is what people will want. Added unit testing to GTMHotKeyTextField. From about 6% up to 90%. DELTA=10 (3 added, 0 deleted, 7 changed) R=thomasvl
Diffstat (limited to 'UnitTesting/GTMSenTestCase.m')
-rw-r--r--UnitTesting/GTMSenTestCase.m22
1 files changed, 13 insertions, 9 deletions
diff --git a/UnitTesting/GTMSenTestCase.m b/UnitTesting/GTMSenTestCase.m
index 8482c5a..99b9db0 100644
--- a/UnitTesting/GTMSenTestCase.m
+++ b/UnitTesting/GTMSenTestCase.m
@@ -312,6 +312,8 @@ NSString *const SenTestLineNumberKey = @"SenTestLineNumberKey";
// Don't want to get leaks on the iPhone Device as the device doesn't
// have 'leaks'. The simulator does though.
+// COV_NF_START
+// We don't have leak checking on by default, so this won't be hit.
static void _GTMRunLeaks(void) {
// This is an atexit handler. It runs leaks for us to check if we are
// leaking anything in our tests.
@@ -338,6 +340,7 @@ static void _GTMRunLeaks(void) {
fflush(stderr);
}
}
+// COV_NF_END
static __attribute__((constructor)) void _GTMInstallLeaks(void) {
BOOL checkLeaks = YES;
@@ -347,15 +350,16 @@ static __attribute__((constructor)) void _GTMInstallLeaks(void) {
if (checkLeaks) {
checkLeaks = getenv("GTM_ENABLE_LEAKS") ? YES : NO;
if (checkLeaks) {
- if (checkLeaks) {
- fprintf(stderr, "Leak Checking Enabled\n");
- fflush(stderr);
- int ret = atexit(&_GTMRunLeaks);
- _GTMDevAssert(ret == 0,
- @"Unable to install _GTMRunLeaks as an atexit handler (%d)",
- errno);
- }
- }
+ // COV_NF_START
+ // We don't have leak checking on by default, so this won't be hit.
+ fprintf(stderr, "Leak Checking Enabled\n");
+ fflush(stderr);
+ int ret = atexit(&_GTMRunLeaks);
+ _GTMDevAssert(ret == 0,
+ @"Unable to install _GTMRunLeaks as an atexit handler (%d)",
+ errno);
+ // COV_NF_END
+ }
}
}