ObjFW  Diff

Differences From Artifact [0c0364260f]:

To Artifact [5c7cef8543]:


53
54
55
56
57
58
59
60

61
62
63
64
65
66
67
53
54
55
56
57
58
59

60
61
62
63
64
65
66
67







-
+








	TEST(@"+[arrayWithCArray:length:]",
	    (a[2] = [OFArray arrayWithCArray: c_ary
				      length: 3]) &&
	    [a[2] isEqual: a[1]])

	TEST(@"-[description]",
	    [[a[0] description ]isEqual: @"(Foo, Bar, Baz)"])
	    [[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]]))

	TEST(@"-[addObject:atIndex:]", R([m[0] addObject: c_ary[1]
						 atIndex: 1]))

260
261
262
263
264
265
266
267

268
269
270
271
272


273
274
275
276
277
278
279

280
281
282
283
284

285
286
287
288
289
260
261
262
263
264
265
266

267
268
269
270


271
272
273
274
275
276
277
278

279
280
281
282
283

284
285
286
287
288
289







-
+



-
-
+
+






-
+




-
+





		case 0:
			return @"foo";
		case 1:
			return @"bar";
		}

		return nil;
		}]) && [[m[0] description] isEqual: @"(foo, bar)"])
		}]) && [[m[0] description] isEqual: @"(\n\tfoo,\n\tbar\n)"])

	TEST(@"-[mappedArrayUsingBLock]",
	    [[[m[0] mappedArrayUsingBlock: ^ id (id obj, size_t idx) {
    		switch (idx) {
    		case 0:
		switch (idx) {
		case 0:
			return @"foobar";
		case 1:
			return @"qux";
		}

		return nil;
	    }] description] isEqual: @"(foobar, qux)"])
	    }] description] isEqual: @"(\n\tfoobar,\n\tqux\n)"])

	TEST(@"-[filteredArrayUsingBlock:]",
	   [[[m[0] filteredArrayUsingBlock: ^ BOOL (id obj, size_t idx) {
		return ([obj isEqual: @"foo"] ? YES : NO);
	    }] description] isEqual: @"(foo)"])
	    }] description] isEqual: @"(\n\tfoo\n)"])
#endif

	[pool drain];
}
@end