aboutsummaryrefslogtreecommitdiff
path: root/UnitTesting/GTMSenTestCase.h
diff options
context:
space:
mode:
authorGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2013-01-22 21:00:16 +0000
committerGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2013-01-22 21:00:16 +0000
commit8febd97bcda82909cf52f10860e8b2675c26b4eb (patch)
treedae2b9b00280b67ab9f64f175327837b81a32b35 /UnitTesting/GTMSenTestCase.h
parent8b801a69e266d8dbb189ae6a9b890344df5c4bf0 (diff)
[Author: thorogood]
Adds [GTMTestCase imageFromResource:], as a helper method during tests. R=thomasvl APPROVED=thomasvl DELTA=46 (44 added, 0 deleted, 2 changed)
Diffstat (limited to 'UnitTesting/GTMSenTestCase.h')
-rw-r--r--UnitTesting/GTMSenTestCase.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/UnitTesting/GTMSenTestCase.h b/UnitTesting/GTMSenTestCase.h
index ce3d902..683dc76 100644
--- a/UnitTesting/GTMSenTestCase.h
+++ b/UnitTesting/GTMSenTestCase.h
@@ -1080,6 +1080,12 @@ GTM_EXTERN NSString *const SenTestLineNumberKey;
#endif // GTM_IPHONE_SDK && !GTM_IPHONE_USE_SENTEST
+#if GTM_IPHONE_SDK
+
+@class UIImage;
+
+#endif // GTM_IPHONE_SDK
+
// All unittest cases in GTM should inherit from GTMTestCase. It makes sure
// to set up our logging system correctly to verify logging calls.
// See GTMUnitTestDevLog.h for details
@@ -1107,4 +1113,22 @@ GTM_EXTERN NSString *const SenTestLineNumberKey;
// "AbstractTest" (case sensitive).
+ (BOOL)isAbstractTestCase;
+#if GTM_IPHONE_SDK
+// Returns the UIImage for the the named |resource|. Asserts that the image is
+// loaded (is non-nil).
+//
+// 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