aboutsummaryrefslogtreecommitdiff
path: root/UnitTesting/GTMUIKit+UnitTesting.h
diff options
context:
space:
mode:
Diffstat (limited to 'UnitTesting/GTMUIKit+UnitTesting.h')
-rw-r--r--UnitTesting/GTMUIKit+UnitTesting.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/UnitTesting/GTMUIKit+UnitTesting.h b/UnitTesting/GTMUIKit+UnitTesting.h
index 578ee4d..bb78a7a 100644
--- a/UnitTesting/GTMUIKit+UnitTesting.h
+++ b/UnitTesting/GTMUIKit+UnitTesting.h
@@ -85,6 +85,18 @@
- (BOOL)gtm_shouldEncodeStateForSubviews;
@end
+// Category to help UIImage testing. UIImage can be tested using
+// GTMAssertObjectImageEqualToImageNamed macro, which automatically creates
+// result images and diff images in case test fails.
+@interface UIImage (GTMUnitTestingAdditions) <GTMUnitTestingImaging>
+// Returns an image containing a representation suitable for use in comparing
+// against a master image.
+//
+// Returns:
+// an image of the object
+- (CGImageRef)gtm_createUnitTestImage;
+@end
+
// A view that allows you to delegate out drawing using the formal
// GTMUnitTestViewDelegate protocol
// This is useful when writing up unit tests for visual elements.