mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-25 01:31:08 +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
7f03a31a28
commit
de0e5ddf1f
1 changed files with 6 additions and 0 deletions
|
@ -29,6 +29,11 @@ int main()
|
||||||
PASS_RUNS([root insertChild: child2 atIndex: 0],
|
PASS_RUNS([root insertChild: child2 atIndex: 0],
|
||||||
"may add a child at index 0");
|
"may add a child at index 0");
|
||||||
PASS(1 == [[root children] count], "parent has a child after insertion");
|
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],
|
PASS_RUNS([root insertChild: child1 atIndex: 0],
|
||||||
"may add a child at index 0");
|
"may add a child at index 0");
|
||||||
|
@ -100,6 +105,7 @@ int main()
|
||||||
PASS_EXCEPTION([root removeChildAtIndex: 100], NSRangeException,
|
PASS_EXCEPTION([root removeChildAtIndex: 100], NSRangeException,
|
||||||
"removing child from invalid index raises");
|
"removing child from invalid index raises");
|
||||||
|
|
||||||
|
|
||||||
[root release];
|
[root release];
|
||||||
[child1 release];
|
[child1 release];
|
||||||
[child2 release];
|
[child2 release];
|
||||||
|
|
Loading…
Reference in a new issue