Differences From Artifact [c4b233b4a6]:
- File
tests/OFArrayTests.m
— part of check-in
[6143baaaee]
at
2013-07-10 12:33:37
on branch trunk
— Get rid of a new Clang warning.
Clang now warns if the enumeration variable of a fast enumeration is not
used. (user: js, size: 8904) [annotate] [blame] [check-ins using]
To Artifact [007d7f7189]:
- File
tests/OFArrayTests.m
— part of check-in
[f975b722df]
at
2013-08-25 12:14:46
on branch trunk
— Add -[OFArray componentsJoinedByString:options:].
This allows to skip empty components. (user: js, size: 9142) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
150 151 152 153 154 155 156 | 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])] && | | > > > > > > | 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 | 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])] && [[m[1] sortedArrayWithOptions: OF_ARRAY_SORT_DESCENDING] isEqual: ([OFArray arrayWithObjects: @"z", @"Foo", @"Baz", @"Bar", @"0", nil])]) EXPECT_EXCEPTION(@"Detect out of range in -[objectAtIndex:]", OFOutOfRangeException, [a[0] objectAtIndex: [a[0] count]]) EXPECT_EXCEPTION(@"Detect out of range in -[removeObjectsInRange:]", OFOutOfRangeException, [m[0] removeObjectsInRange: of_range(0, [m[0] count] + 1)]) TEST(@"-[componentsJoinedByString:]", (a[1] = [OFArray arrayWithObjects: @"foo", @"bar", @"baz", nil]) && [[a[1] componentsJoinedByString: @" "] isEqual: @"foo bar baz"] && (a[1] = [OFArray arrayWithObject: @"foo"]) && [[a[1] componentsJoinedByString: @" "] isEqual: @"foo"]) TEST(@"-[componentsJoinedByString:options]", (a[1] = [OFArray arrayWithObjects: @"", @"foo", @"", @"", @"bar", @"", nil]) && [[a[1] componentsJoinedByString: @" " options: OF_ARRAY_SKIP_EMPTY] isEqual: @"foo bar"]) m[0] = [[a[0] mutableCopy] autorelease]; ok = true; i = 0; TEST(@"-[objectEnumerator]", (enumerator = [m[0] objectEnumerator])) |
︙ | ︙ |