@@ -16,17 +16,17 @@ #import "OFDataArray.h" #import "OFAutoreleasePool.h" #import "OFString.h" #import "OFExceptions.h" -#import "main.h" +#import "TestsAppDelegate.h" static OFString *module; const char *str = "Hello!"; -static void -do_tests(Class class) +@implementation TestsAppDelegate (OFDataArrayTests) +- (void)dataArrayTestsWithClass: (Class)class { OFDataArray *array[4]; void *data[2]; Class other; @@ -109,18 +109,18 @@ EXPECT_EXCEPTION(@"Detect out of range in -[removeNItems:]", OFOutOfRangeException, [array[0] removeNItems: [array[0] count] + 1]) } -void -dataarray_tests() +- (void)dataArrayTests { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; module = @"OFDataArray"; - do_tests([OFDataArray class]); + [self dataArrayTestsWithClass: [OFDataArray class]]; module = @"OFBigDataArray"; - do_tests([OFBigDataArray class]); + [self dataArrayTestsWithClass: [OFBigDataArray class]]; [pool drain]; } +@end