diff options
author | gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2009-09-16 17:04:27 +0000 |
---|---|---|
committer | gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2009-09-16 17:04:27 +0000 |
commit | 080b28284751ae178608f45268765f6e0ae94287 (patch) | |
tree | 615c076d5a79621921eac431f5857f6e2d73c8c0 /UnitTesting/GTMSenTestCase.h | |
parent | 9ebf8b15cfb105864e97a0e8b005de8e6e5d5c42 (diff) |
[Author: dmaclach]
Add support for more complex unit test class hierarchies than what is
available out of the box in SenTestCase. I currently have the release notes
checked out as part of a separate change, and will update them accordingly
for this as well.
R=thomasvl,mrossetti
DELTA=80 (79 added, 0 deleted, 1 changed)
Diffstat (limited to 'UnitTesting/GTMSenTestCase.h')
-rw-r--r-- | UnitTesting/GTMSenTestCase.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/UnitTesting/GTMSenTestCase.h b/UnitTesting/GTMSenTestCase.h index 9837b2b..58c0594 100644 --- a/UnitTesting/GTMSenTestCase.h +++ b/UnitTesting/GTMSenTestCase.h @@ -1008,4 +1008,27 @@ GTM_EXTERN NSString *const SenTestLineNumberKey; // to set up our logging system correctly to verify logging calls. // See GTMUnitTestDevLog.h for details @interface GTMTestCase : SenTestCase + +// Returns YES if this is an abstract testCase class as opposed to a concrete +// testCase class that you want tests run against. SenTestCase is not designed +// out of the box to handle an abstract class hierarchy descending from it with +// some concrete subclasses. In some cases we want all the "concrete" +// subclasses of an abstract subclass of SenTestCase to run a test, but we don't +// want that test to be run against an instance of an abstract subclass itself. +// By returning "YES" here, the tests defined by this class won't be run against +// an instance of this class. As an example class hierarchy: +// +// FooExtensionTestCase +// GTMTestCase <- ExtensionTestCase < +// BarExtensionTestCase +// +// So FooExtensionTestCase and BarExtensionTestCase inherit from +// ExtensionTestCase (and probably FooExtension and BarExtension inherit from a +// class named Extension). We want the tests in ExtensionTestCase to be run as +// part of FooExtensionTestCase and BarExtensionTestCase, but we don't want them +// run against ExtensionTestCase. The default implementation of +// isAbstractTestCase returns NO if self (being a class) has no subclasses and +// YES otherwise. ++ (BOOL)isAbstractTestCase; + @end |