136
137
138
139
140
141
142
143
144
145
146
147
148
149
|
[m[1] count] == 2 && [[m[1] objectAtIndex: 1] isEqual: c_ary[2]])
m[1] = [[a[0] mutableCopy] autorelease];
TEST(@"-[removeObjectsInRange:]",
R([m[1] removeObjectsInRange: of_range(0, 2)]) &&
[m[1] count] == 1 && [[m[1] objectAtIndex: 0] isEqual: c_ary[2]])
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:]",
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
|
[m[1] count] == 2 && [[m[1] objectAtIndex: 1] isEqual: c_ary[2]])
m[1] = [[a[0] mutableCopy] autorelease];
TEST(@"-[removeObjectsInRange:]",
R([m[1] removeObjectsInRange: of_range(0, 2)]) &&
[m[1] count] == 1 && [[m[1] objectAtIndex: 0] isEqual: c_ary[2]])
m[1] = [[a[0] mutableCopy] autorelease];
[m[1] addObject: @"qux"];
[m[1] addObject: @"last"];
TEST(@"-[reverse]",
R([m[1] reverse]) && [m[1] isEqual: ([OFArray arrayWithObjects:
@"last", @"qux", @"Baz", @"Bar", @"Foo", nil])])
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:]",
|