mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
NSPointerArray: Test for duplicate values in array
This commit is contained in:
parent
b993f10e76
commit
0179730611
1 changed files with 3 additions and 1 deletions
|
@ -27,11 +27,13 @@ int main()
|
|||
PASS([obj count] == 1, "+addPointer: increments count");
|
||||
[obj addPointer: nil];
|
||||
PASS([obj count] == 2, "+addPointer: works with nil");
|
||||
[obj addPointer: nil];
|
||||
PASS([obj count] == 3, "+addPointer: respects duplicate values");
|
||||
|
||||
[obj insertPointer: (void*)vals[0] atIndex: 0];
|
||||
[obj insertPointer: (void*)vals[1] atIndex: 0];
|
||||
[obj insertPointer: (void*)vals[2] atIndex: 0];
|
||||
PASS([obj count] == 5 && [obj pointerAtIndex: 2] == (void*)vals[0],
|
||||
PASS([obj count] == 6 && [obj pointerAtIndex: 2] == (void*)vals[0],
|
||||
"+insertPointer:atIndex: works");
|
||||
|
||||
LEAVE_POOL
|
||||
|
|
Loading…
Reference in a new issue