mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Add tests for notification equality
This commit is contained in:
parent
132729e6e0
commit
cd68b7e4da
1 changed files with 12 additions and 0 deletions
|
@ -26,7 +26,19 @@ int main()
|
|||
NSMutableArray *testObjs = [[NSMutableArray alloc] init];
|
||||
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||
|
||||
NSDictionary *info = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
@"obj", @"key", nil];
|
||||
NSNotification *o1 = [NSNotification notificationWithName: @"hello"
|
||||
object: @"there"
|
||||
userInfo: info];
|
||||
NSNotification *o2 = [NSNotification notificationWithName: @"hello"
|
||||
object: @"there"
|
||||
userInfo: info];
|
||||
PASS([o1 hash] == [o2 hash], "equal notification hashes")
|
||||
PASS_EQUAL(o1, o2, "equal notifications")
|
||||
|
||||
test_alloc(@"NSNotification");
|
||||
|
||||
obj = [NSNotification new];
|
||||
[testObjs addObject: obj];
|
||||
test_NSObject(@"NSNotification", testObjs);
|
||||
|
|
Loading…
Reference in a new issue