diff --git a/Tests/Foundation/CPArrayTest.j b/Tests/Foundation/CPArrayTest.j index 04ea56486..f195d99f8 100644 --- a/Tests/Foundation/CPArrayTest.j +++ b/Tests/Foundation/CPArrayTest.j @@ -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