GHTesting Class Reference
| Inherits from | NSObject |
| Declared in | GHTesting.h GHTesting.m |
Tasks
-
+ sharedInstanceThe shared testing instance.
-
– loadAllTestCasesLoad all test classes that we can “see”.
-
– loadTestsFromTarget:Load tests from target.
-
– isTestCaseClass:See if class is of a registered test case class.
-
– registerClass:Register test case class.
-
– registerClassName:Register test case class by name.
-
+ descriptionForException:Format test exception.
-
+ exceptionFilenameForTest:Filename for cause of test exception.
-
+ exceptionLineNumberForTest:Line number for cause of test exception.
-
+ runTestWithTarget:selector:exception:interval:reraiseExceptions:Run test.
-
+ runTestOrRaiseWithTarget:selector:exception:interval:Same as normal runTest without catching exceptions.
Class Methods
descriptionForException:
Format test exception.
+ (NSString *)descriptionForException:(NSException *)exceptionParameters
- exception
Exception
Return Value
Description
Declared In
GHTesting.hexceptionFilenameForTest:
Filename for cause of test exception.
+ (NSString *)exceptionFilenameForTest:(id<GHTest>)testParameters
- test
Test
Return Value
Filename
Declared In
GHTesting.hexceptionLineNumberForTest:
Line number for cause of test exception.
+ (NSInteger)exceptionLineNumberForTest:(id<GHTest>)testParameters
- test
Test
Return Value
Line number
Declared In
GHTesting.hrunTestOrRaiseWithTarget:selector:exception:interval:
Same as normal runTest without catching exceptions.
+ (BOOL)runTestOrRaiseWithTarget:(id)target selector:(SEL)selector exception:(NSException **)exception interval:(NSTimeInterval *)intervalParameters
- target
Target
- selector
Selector
- exception
Exception, if set, is retained and should be released by the caller.
- interval
Time to run the test
Declared In
GHTesting.hrunTestWithTarget:selector:exception:interval:reraiseExceptions:
Run test.
+ (BOOL)runTestWithTarget:(id)target selector:(SEL)selector exception:(NSException **)exception interval:(NSTimeInterval *)interval reraiseExceptions:(BOOL)reraiseExceptionsParameters
- target
Target
- selector
Selector
- exception
Exception, if set, is retained and should be released by the caller.
- interval
Time to run the test
- reraiseExceptions
If YES, will re-raise exceptions
Declared In
GHTesting.hInstance Methods
isTestCaseClass:
See if class is of a registered test case class.
- (BOOL)isTestCaseClass:(Class)aClassParameters
- aClass
Class
Declared In
GHTesting.hloadAllTestCases
Load all test classes that we can “see”.
- (NSArray *)loadAllTestCasesReturn Value
Array of initialized (and autoreleased) test case classes in an autoreleased array.
Declared In
GHTesting.hloadTestsFromTarget:
Load tests from target.
- (NSArray *)loadTestsFromTarget:(id)targetParameters
- target
Target
Return Value
Array of idGHTest
Declared In
GHTesting.h