From 6af47ca6a866a1bdc045163556030f3e5ebbf11b Mon Sep 17 00:00:00 2001 From: "gtm.daemon" Date: Wed, 23 Jan 2013 03:12:46 +0000 Subject: On second thought, drop the OS X support for now. DELTA=31 (1 added, 29 deleted, 1 changed) --- UnitTesting/GTMSenTestCase.h | 17 ++++------------- UnitTesting/GTMSenTestCase.m | 9 --------- 2 files changed, 4 insertions(+), 22 deletions(-) (limited to 'UnitTesting') diff --git a/UnitTesting/GTMSenTestCase.h b/UnitTesting/GTMSenTestCase.h index 55cd813..744550f 100644 --- a/UnitTesting/GTMSenTestCase.h +++ b/UnitTesting/GTMSenTestCase.h @@ -60,7 +60,7 @@ #ifdef __cplusplus extern "C" { #endif - + #if defined __clang__ // gcc and gcc-llvm do not allow you to use STAssert(blah, nil) with nil // as a description if you have the NS_FORMAT_FUNCTION on. @@ -69,7 +69,7 @@ NSString *STComposeString(NSString *, ...) NS_FORMAT_FUNCTION(1, 2); #else NSString *STComposeString(NSString *, ...); #endif // __clang__ - + #ifdef __cplusplus } #endif @@ -1081,9 +1081,9 @@ GTM_EXTERN NSString *const SenTestLineNumberKey; #endif // GTM_IPHONE_SDK && !GTM_IPHONE_USE_SENTEST #if GTM_IPHONE_SDK + @class UIImage; -#else -@class NSImage; + #endif // GTM_IPHONE_SDK // All unittest cases in GTM should inherit from GTMTestCase. It makes sure @@ -1120,15 +1120,6 @@ GTM_EXTERN NSString *const SenTestLineNumberKey; // This is required as while under test, [UIImage imageNamed:...] does not // correctly load images from the resources associated with a test class. - (UIImage *)imageFromResource:(NSString *)resource; - -#else -// Returns the NSImage for the the named |resource|. Asserts that the image is -// loaded (is non-nil). -// -// This is required as while under test, [NSImage imageNamed:...] does not -// correctly load images from the resources associated with a test class. -- (NSImage *)imageFromResource:(NSString *)resource; - #endif // GTM_IPHONE_SDK @end diff --git a/UnitTesting/GTMSenTestCase.m b/UnitTesting/GTMSenTestCase.m index fbd8659..088514c 100644 --- a/UnitTesting/GTMSenTestCase.m +++ b/UnitTesting/GTMSenTestCase.m @@ -29,7 +29,6 @@ #if GTM_IPHONE_SDK #import #else -#import // For NSImage #import "GTMGarbageCollection.h" #endif // GTM_IPHONE_SDK @@ -433,14 +432,6 @@ static int MethodSort(id a, id b, void *context) { STAssertNotNil(image, @"Could not load image from resource: %@", path); return image; } -#else -- (NSImage *)imageFromResource:(NSString *)resource { - NSBundle *bundle = [NSBundle bundleForClass:[self class]]; - NSString *path = [bundle pathForResource:resource ofType:nil]; - NSImage *image = [[NSImage alloc] initWithContentsOfFile:path]; - STAssertNotNil(image, @"Could not load image from resource: %@", path); - return image; -} #endif + (NSArray *)testInvocations { -- cgit v1.2.3