Skip to content

Commit

Permalink
unit test for CWAVLTree -objectIsInTree
Browse files Browse the repository at this point in the history
  • Loading branch information
Machx committed Aug 15, 2012
1 parent d118a93 commit 8543386
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Source/CWAVLTreeTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,20 @@ -(void)testBasicInsertion
[tree addObject:@10];
}

-(void)testObjectIsInTree
{
CWAVLTree *tree = [[CWAVLTree alloc] init];

[tree addObject:@42];
[tree addObject:@50];
[tree addObject:@8];

STAssertTrue([tree objectIsInTree:@42], nil);
STAssertTrue([tree objectIsInTree:@50], nil);
STAssertTrue([tree objectIsInTree:@8], nil);
STAssertFalse([tree objectIsInTree:@100], nil);
STAssertFalse([tree objectIsInTree:@1], nil);
STAssertFalse([tree objectIsInTree:@1000], nil);
}

@end

0 comments on commit 8543386

Please sign in to comment.