Differences From Artifact [65511c9fb4]:
- File tests/OFArrayTests.m — part of check-in [2fd13b0adf] at 2012-01-31 13:55:32 on branch trunk — Remove forgotten debug output. (user: js, size: 8969) [annotate] [blame] [check-ins using]
To Artifact [19f0fe9122]:
- File
tests/OFArrayTests.m
— part of check-in
[008be86a16]
at
2012-03-12 11:54:22
on branch trunk
— OFArray: +[arrayWithCArray:length:] -> +[arrayWithObjects:count:].
This is required for the new array literals. (user: js, size: 8884) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
25 26 27 28 29 30 31 | #import "TestsAppDelegate.h" static OFString *module = @"OFArray"; static OFString *c_ary[] = { @"Foo", @"Bar", | | < < < | | | | | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | #import "TestsAppDelegate.h" static OFString *module = @"OFArray"; static OFString *c_ary[] = { @"Foo", @"Bar", @"Baz" }; @implementation TestsAppDelegate (OFArrayTests) - (void)arrayTests { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; OFArray *a[3]; OFMutableArray *m[2]; OFEnumerator *enumerator; id obj; BOOL ok; size_t i; TEST(@"+[array]", (m[0] = [OFMutableArray array])) TEST(@"+[arrayWithObjects:]", (a[0] = [OFArray arrayWithObjects: @"Foo", @"Bar", @"Baz", nil])) TEST(@"+[arrayWithObjects:count:]", (a[1] = [OFArray arrayWithObjects: c_ary count: 3]) && [a[1] isEqual: a[0]]) TEST(@"-[description]", [[a[0] description ]isEqual: @"(\n\tFoo,\n\tBar,\n\tBaz\n)"]) TEST(@"-[addObject:]", R([m[0] addObject: c_ary[0]]) && R([m[0] addObject: c_ary[2]])) |
︙ | ︙ |