mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-13 14:11:27 +00:00
Add a test for the initWithItems:copy: fix.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user