diff --git a/Tests/AppKit/CPArrayControllerPerformance.j b/Tests/AppKit/CPArrayControllerPerformance.j new file mode 100644 index 000000000..fef9c9c4a --- /dev/null +++ b/Tests/AppKit/CPArrayControllerPerformance.j @@ -0,0 +1,64 @@ +@import +@import +@import + +@implementation CPArrayControllerPerformance : OJTestCase + +- (void)testRearrangeObjects +{ + var ELEMENTS = 200, + REPEATS = 50, + ac = [CPArrayController new], + array = []; + + for (var i=0; i= last) + [self fail:"array values should be descending (position: "+j+")"]; + last = sorted[j]; + } + } + + + var end = (new Date).getTime(); + + CPLog.warn("testRearrangeObjects: "+(end-start)+"ms"); +} + +@end + +@implementation Sortable : CPObject +{ + int a @accessors; + int b @accessors; +} + +@end \ No newline at end of file