150
151
152
153
154
155
156
157
158
159
160
161
162
163
|
m[1] = [[a[0] mutableCopy] autorelease];
[m[1] addObject: @"qux"];
[m[1] addObject: @"last"];
TEST(@"-[reversedArray]",
[[m[1] reversedArray] isEqual: ([OFArray arrayWithObjects:
@"last", @"qux", @"Baz", @"Bar", @"Foo", nil])])
EXPECT_EXCEPTION(@"Detect out of range in -[objectAtIndex:]",
OFOutOfRangeException, [a[0] objectAtIndex: [a[0] count]])
EXPECT_EXCEPTION(@"Detect out of range in -[removeNObjects:]",
OFOutOfRangeException, [m[0] removeNObjects: [m[0] count] + 1])
TEST(@"-[componentsJoinedByString:]",
|
>
>
>
>
>
>
>
>
|
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
|
m[1] = [[a[0] mutableCopy] autorelease];
[m[1] addObject: @"qux"];
[m[1] addObject: @"last"];
TEST(@"-[reversedArray]",
[[m[1] reversedArray] isEqual: ([OFArray arrayWithObjects:
@"last", @"qux", @"Baz", @"Bar", @"Foo", nil])])
m[1] = [[a[0] mutableCopy] autorelease];
[m[1] addObject: @"0"];
[m[1] addObject: @"z"];
TEST(@"-[sortedArray]",
[[m[1] sortedArray] isEqual: ([OFArray arrayWithObjects:
@"0", @"Bar", @"Baz", @"Foo", @"z", nil])])
puts([[[m[1] sortedArray] description] UTF8String]);
EXPECT_EXCEPTION(@"Detect out of range in -[objectAtIndex:]",
OFOutOfRangeException, [a[0] objectAtIndex: [a[0] count]])
EXPECT_EXCEPTION(@"Detect out of range in -[removeNObjects:]",
OFOutOfRangeException, [m[0] removeNObjects: [m[0] count] + 1])
TEST(@"-[componentsJoinedByString:]",
|