aboutsummaryrefslogtreecommitdiff
path: root/UnitTesting
diff options
context:
space:
mode:
authorGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2013-12-19 21:30:10 +0000
committerGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2013-12-19 21:30:10 +0000
commit9b8635767148b3f95942593bfeefa86f147d2c53 (patch)
tree357cf2390edbb1d150830133228cda393203ee48 /UnitTesting
parentca3d74790bcf2d42bc6a9c3dc653c7e8a485705c (diff)
Fix build of Mac GTM project with static analyzer. Remove GTMGarbageCollection. Remove GC build configs. Remove internal dependence on GTMObjectSingleton.
DELTA=447 (49 added, 296 deleted, 102 changed)
Diffstat (limited to 'UnitTesting')
-rw-r--r--UnitTesting/GTMAppKit+UnitTesting.m1
-rw-r--r--UnitTesting/GTMAppKitUnitTestingUtilities.m1
-rw-r--r--UnitTesting/GTMCALayer+UnitTesting.m1
-rw-r--r--UnitTesting/GTMNSObject+UnitTesting.m2
-rw-r--r--UnitTesting/GTMSenTestCase.m32
5 files changed, 12 insertions, 25 deletions
diff --git a/UnitTesting/GTMAppKit+UnitTesting.m b/UnitTesting/GTMAppKit+UnitTesting.m
index 02e0e30..5b4d6f7 100644
--- a/UnitTesting/GTMAppKit+UnitTesting.m
+++ b/UnitTesting/GTMAppKit+UnitTesting.m
@@ -22,7 +22,6 @@
#import "GTMAppKit+UnitTesting.h"
#import "GTMGeometryUtils.h"
#import "GTMMethodCheck.h"
-#import "GTMGarbageCollection.h"
#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4
#define ENCODE_NSINTEGER(coder, i, key) [(coder) encodeInt:(i) forKey:(key)]
diff --git a/UnitTesting/GTMAppKitUnitTestingUtilities.m b/UnitTesting/GTMAppKitUnitTestingUtilities.m
index 5d87541..71c4d76 100644
--- a/UnitTesting/GTMAppKitUnitTestingUtilities.m
+++ b/UnitTesting/GTMAppKitUnitTestingUtilities.m
@@ -21,7 +21,6 @@
#include <signal.h>
#include <unistd.h>
#import "GTMDefines.h"
-#import "GTMGarbageCollection.h"
// The Users profile before we change it on them
static CMProfileRef gGTMCurrentColorProfile = NULL;
diff --git a/UnitTesting/GTMCALayer+UnitTesting.m b/UnitTesting/GTMCALayer+UnitTesting.m
index 3ffa209..52367e5 100644
--- a/UnitTesting/GTMCALayer+UnitTesting.m
+++ b/UnitTesting/GTMCALayer+UnitTesting.m
@@ -21,7 +21,6 @@
//
#import "GTMCALayer+UnitTesting.h"
-#import "GTMGarbageCollection.h"
@implementation CALayer (GTMUnitTestingAdditions)
diff --git a/UnitTesting/GTMNSObject+UnitTesting.m b/UnitTesting/GTMNSObject+UnitTesting.m
index df75f14..209b9b2 100644
--- a/UnitTesting/GTMNSObject+UnitTesting.m
+++ b/UnitTesting/GTMNSObject+UnitTesting.m
@@ -20,8 +20,6 @@
#import "GTMNSObject+UnitTesting.h"
#import "GTMSystemVersion.h"
-#import "GTMGarbageCollection.h"
-#import "GTMNSNumber+64Bit.h"
#if GTM_IPHONE_SDK
#import <UIKit/UIKit.h>
diff --git a/UnitTesting/GTMSenTestCase.m b/UnitTesting/GTMSenTestCase.m
index 088514c..fab3ee0 100644
--- a/UnitTesting/GTMSenTestCase.m
+++ b/UnitTesting/GTMSenTestCase.m
@@ -28,8 +28,6 @@
#if GTM_IPHONE_SDK
#import <UIKit/UIKit.h>
-#else
-#import "GTMGarbageCollection.h"
#endif // GTM_IPHONE_SDK
#if GTM_IPHONE_SDK && !GTM_IPHONE_USE_SENTEST
@@ -488,25 +486,19 @@ static void _GTMRunLeaks(void) {
// COV_NF_END
static __attribute__((constructor)) void _GTMInstallLeaks(void) {
- BOOL checkLeaks = YES;
-#if !GTM_IPHONE_SDK
- checkLeaks = GTMIsGarbageCollectionEnabled() ? NO : YES;
-#endif // !GTM_IPHONE_SDK
+ BOOL checkLeaks = getenv("GTM_ENABLE_LEAKS") ? YES : NO;
if (checkLeaks) {
- checkLeaks = getenv("GTM_ENABLE_LEAKS") ? YES : NO;
- if (checkLeaks) {
- // 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);
- // To avoid unused variable warning when _GTMDevAssert is stripped.
- (void)ret;
- _GTMDevAssert(ret == 0,
- @"Unable to install _GTMRunLeaks as an atexit handler (%d)",
- errno);
- // COV_NF_END
- }
+ // 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);
+ // To avoid unused variable warning when _GTMDevAssert is stripped.
+ (void)ret;
+ _GTMDevAssert(ret == 0,
+ @"Unable to install _GTMRunLeaks as an atexit handler (%d)",
+ errno);
+ // COV_NF_END
}
}