diff options
author | gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2013-01-23 03:12:37 +0000 |
---|---|---|
committer | gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2013-01-23 03:12:37 +0000 |
commit | fa33445a5ad223b7c4f69c1ddee3ab2503716eed (patch) | |
tree | e58026ac3973439a42ad8cf1820ea8efa42aeb45 /UnitTesting | |
parent | 8febd97bcda82909cf52f10860e8b2675c26b4eb (diff) |
Fixup for the testing helper for OS X:
- Get NSImage defined.
- Add framework to linking.
Diffstat (limited to 'UnitTesting')
-rw-r--r-- | UnitTesting/GTMSenTestCase.h | 4 | ||||
-rw-r--r-- | UnitTesting/GTMSenTestCase.m | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/UnitTesting/GTMSenTestCase.h b/UnitTesting/GTMSenTestCase.h index 683dc76..55cd813 100644 --- a/UnitTesting/GTMSenTestCase.h +++ b/UnitTesting/GTMSenTestCase.h @@ -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 diff --git a/UnitTesting/GTMSenTestCase.m b/UnitTesting/GTMSenTestCase.m index 4a7ae8f..fbd8659 100644 --- a/UnitTesting/GTMSenTestCase.m +++ b/UnitTesting/GTMSenTestCase.m @@ -29,6 +29,7 @@ #if GTM_IPHONE_SDK #import <UIKit/UIKit.h> #else +#import <AppKit/AppKit.h> // For NSImage #import "GTMGarbageCollection.h" #endif // GTM_IPHONE_SDK @@ -436,7 +437,7 @@ static int MethodSort(id a, id b, void *context) { - (NSImage *)imageFromResource:(NSString *)resource { NSBundle *bundle = [NSBundle bundleForClass:[self class]]; NSString *path = [bundle pathForResource:resource ofType:nil]; - NSImage *image = [NSImage imageWithContentsOfFile:path]; + NSImage *image = [[NSImage alloc] initWithContentsOfFile:path]; STAssertNotNil(image, @"Could not load image from resource: %@", path); return image; } |