mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 17:10:48 +00:00
more child checks
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34439 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
bb8dbe57a5
commit
ef989c5d3b
1 changed files with 6 additions and 0 deletions
|
@ -29,6 +29,11 @@ int main()
|
|||
PASS_RUNS([root insertChild: child2 atIndex: 0],
|
||||
"may add a child at index 0");
|
||||
PASS(1 == [[root children] count], "parent has a child after insertion");
|
||||
PASS_RUNS([root removeChildAtIndex: 0],
|
||||
"removing child works");
|
||||
PASS_EQUAL([root children], nil, "children is nil after removal");
|
||||
PASS_RUNS([root insertChild: child2 atIndex: 0],
|
||||
"may reinsert a child at index 0");
|
||||
|
||||
PASS_RUNS([root insertChild: child1 atIndex: 0],
|
||||
"may add a child at index 0");
|
||||
|
@ -100,6 +105,7 @@ int main()
|
|||
PASS_EXCEPTION([root removeChildAtIndex: 100], NSRangeException,
|
||||
"removing child from invalid index raises");
|
||||
|
||||
|
||||
[root release];
|
||||
[child1 release];
|
||||
[child2 release];
|
||||
|
|
Loading…
Reference in a new issue