Add a test for the initWithItems:copy: fix.

This commit is contained in:
Ross Boucher
2010-03-03 20:38:56 -08:00
parent 0b5db9c4bd
commit e034abef82
+19
View File
@@ -155,6 +155,14 @@
}
}
- (void)testInitWithArrayCopyItems
{
var a = [[CopyableObject new], 2, 3];
var b = [[CPArray alloc] initWithArray:a copyItems:YES];
[self assert:a notEqual:b];
}
@end
@implementation CPArray (reverse)
@@ -169,3 +177,14 @@
}
@end
@implementation CopyableObject : CPObject
{
}
- (id)copy
{
return [[[self class] alloc] init];
}
@end