* Source/NSXMLElement.m: Remove setObjectValue: implementation.

* Source/NSXMLNode.m: Remove comments around code to replace
	nil value.
	* Tests/base/NSXMLNode/basic.m: correct test.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/branches/nsxml_using_libxml2@34611 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2012-01-23 17:10:26 +00:00
parent b34c744c20
commit f7851efd2a
4 changed files with 9 additions and 39 deletions

View file

@ -1,3 +1,10 @@
2012-01-23 12:09-EST Gregory John Casamento <greg.casamento@gmail.com>
* Source/NSXMLElement.m: Remove setObjectValue: implementation.
* Source/NSXMLNode.m: Remove comments around code to replace
nil value.
* Tests/base/NSXMLNode/basic.m: correct test.
2012-01-21 06:16-EST Gregory John Casamento <greg.casamento@gmail.com>
* Source/NSXMLDocument.m

View file

@ -239,16 +239,6 @@ extern void clearPrivatePointers(xmlNodePtr aNode);
}
}
- (void) setObjectValue: (id)value
{
if(nil == value)
{
ASSIGN(internal->objectValue, [NSString stringWithString: @""]);
return;
}
ASSIGN(internal->objectValue, value);
}
- (NSArray*) namespaces
{
NSMutableArray *result = nil;

View file

@ -101,32 +101,6 @@ GS_PRIVATE_INTERNAL(NSXMLNode)
return result;
}
/*
+ (xmlNodePtr) _nodeForObject: (NSXMLNode *)object
{
xmlNodePtr node = NULL;
if(object)
{
NSXMLNodeKind kind = [object kind];
switch (kind)
{
case(NSXMLAttributeKind):
node = (xmlNodePtr)xmlNewProp(NULL,
(xmlChar *)XMLSTRING([object name]),
(xmlChar *)XMLSTRING([object stringValue]));
break;
case(NSXMLElementKind):
node = xmlNewNode(NULL,XMLSTRING([object name]));
break;
case(NSXMLInvalidKind):
node = xmlNewNode(NULL,XMLSTRING([object name]));
break;
}
}
return node;
}
*/
- (void) _addSubNode:(NSXMLNode *)subNode
{
if (!internal->subNodes)
@ -991,13 +965,11 @@ NSArray *execute_xpath(NSXMLNode *node,
- (void) setObjectValue: (id)value
{
/*
if(nil == value)
{
ASSIGN(internal->objectValue, [NSString stringWithString: @""]);
return;
}
*/
ASSIGN(internal->objectValue, value);
}

View file

@ -37,7 +37,8 @@ int main()
PASS_EQUAL([node objectValue], @"anObject",
"setting object value on invalid node works");
[node setObjectValue: nil];
PASS_EQUAL([node objectValue], nil,
// Per documentation on NSXMLNode setObjectValue/objectValue,
PASS_EQUAL([node objectValue], @"",
"setting nil object value on invalid node works");
[node setStringValue: @"aString"];
PASS_EQUAL([node stringValue], @"aString",