* Source/NSXMLNode.m: Remove all the extra reference handling code

and the special retain and release methods.
* Tests/base/NSXMLNode/basic.m,
* Tests/base/NSXMLNode/children.m: A few more test
cases. Validated on MacOSX 10.6.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34873 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2012-03-03 11:37:49 +00:00
parent 4296dba91e
commit 38483746b3
4 changed files with 47 additions and 203 deletions

View file

@ -10,10 +10,13 @@ int main()
NSXMLNode *attr;
node = [[NSXMLNode alloc] initWithKind: NSXMLInvalidKind];
test_alloc(@"NSXMLNode");
test_NSObject(@"NSXMLNode", [NSArray arrayWithObject: node]);
other = [[NSXMLNode alloc] initWithKind: NSXMLElementKind];
// We need to set the name, otherwise isEqual: wont work.
[other setName: @"test"];
test_alloc(@"NSXMLNode");
test_NSObject(@"NSXMLNode", [NSArray arrayWithObjects: node, other, nil]);
test_NSCopying(@"NSXMLNode", @"NSXMLNode", [NSArray arrayWithObjects: node, other, nil], NO, YES);
PASS(NO == [other isEqual: node], "different node kinds are not equal");
[other release];
@ -39,7 +42,8 @@ int main()
"setting object value on invalid node works");
[node setObjectValue: nil];
// Per documentation on NSXMLNode setObjectValue/objectValue,
PASS_EQUAL([node objectValue], @"",
// On 10.6 this returns nil not @""
PASS_EQUAL([node objectValue], nil,
"setting nil object value on invalid node works");
[node setStringValue: @"aString"];
PASS_EQUAL([node stringValue], @"aString",