mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-26 13:37:03 +00:00
Refs #1630. Add test.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user