mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
* 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:
parent
4296dba91e
commit
38483746b3
4 changed files with 47 additions and 203 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue