Refs #1630. Add test.

This commit is contained in:
Alexander Ljungberg
2012-07-23 15:35:52 +02:00
parent d0b152c638
commit 9eee7a214e
+8
View File
@@ -673,6 +673,14 @@
[self assertTrue:s2[0] === A message:s2[0] + " is larger then " + A + " when sorting descending"];
}
- (void)testDisallowObservers
{
var anArray = [CPArray arrayWithObject:0];
[self assertThrows:function() { [anArray addObserver:self forKeyPath:@"self" options:0 context:nil]; }];
[self assertThrows:function() { [anArray removeObserver:self forKeyPath:@"self"]; }];
}
@end
@implementation AlwaysEqual : CPObject