aboutsummaryrefslogtreecommitdiff
path: root/UnitTesting/GTMSenTestCase.m
diff options
context:
space:
mode:
authorGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2014-06-02 16:30:07 +0000
committerGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2014-06-02 16:30:07 +0000
commit4ca2ed5f9eaf1a7e1b0d09044c5d27484266ab8e (patch)
tree93aaae7ca57b552d3b7b67733a7cab2d0dc7260e /UnitTesting/GTMSenTestCase.m
parent7652afc74f51fa3c4f4b56898c2e14fce157af5f (diff)
Add support for XCTest (as opposed to OCUnit) to GTM. Define GTM_USING_XCTEST to 1 to use it.
DELTA=486 (352 added, 0 deleted, 134 changed) DELTA_BY_EXTENSION=h=467,m=15,mm=1,txt=3
Diffstat (limited to 'UnitTesting/GTMSenTestCase.m')
-rw-r--r--UnitTesting/GTMSenTestCase.m6
1 files changed, 5 insertions, 1 deletions
diff --git a/UnitTesting/GTMSenTestCase.m b/UnitTesting/GTMSenTestCase.m
index e9c4ecf..e2f2ceb 100644
--- a/UnitTesting/GTMSenTestCase.m
+++ b/UnitTesting/GTMSenTestCase.m
@@ -30,7 +30,7 @@
#import <UIKit/UIKit.h>
#endif // GTM_IPHONE_SDK
-#if GTM_IPHONE_SDK && !GTM_IPHONE_USE_SENTEST
+#if GTM_IPHONE_SDK && !GTM_IPHONE_USE_SENTEST && !GTM_USING_XCTEST
#import <stdarg.h>
@interface NSException (GTMSenTestPrivateAdditions)
@@ -427,7 +427,11 @@ static NSInteger MethodSort(id a, id b, void *context) {
NSBundle *bundle = [NSBundle bundleForClass:[self class]];
NSString *path = [bundle pathForResource:resource ofType:nil];
UIImage *image = [UIImage imageWithContentsOfFile:path];
+#if GTM_USING_XCTEST
+ XCTAssertNotNil(image, @"Could not load image from resource: %@", path);
+#else
STAssertNotNil(image, @"Could not load image from resource: %@", path);
+#endif // GTM_USING_XCTEST
return image;
}
#endif