mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
2012-01-02 02:26-EST Gregory John Casamento <greg.casamento@gmail.com>
* Source/NSXMLNode.m>: Minor correction. Move setName out of private category. * Tests/base/NSXMLNode/children.m: Update test. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34385 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
df9285cd51
commit
73273b7e75
3 changed files with 14 additions and 9 deletions
|
@ -1,3 +1,9 @@
|
|||
2012-01-02 02:26-EST Gregory John Casamento <greg.casamento@gmail.com>
|
||||
|
||||
* Source/NSXMLNode.m>: Minor correction. Move setName out of
|
||||
private category.
|
||||
* Tests/base/NSXMLNode/children.m: Update test.
|
||||
|
||||
2012-01-01 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Headers/Foundation/NSXMLDTDNode.h,
|
||||
|
|
|
@ -51,11 +51,6 @@ GS_PRIVATE_INTERNAL(NSXMLNode)
|
|||
#import "NSXMLPrivate.h"
|
||||
|
||||
@implementation NSXMLNode (Private)
|
||||
- (void) setName: (NSString *)name
|
||||
{
|
||||
ASSIGN(_name, name);
|
||||
}
|
||||
|
||||
- (void) setParent: (NSXMLNode *)node
|
||||
{
|
||||
ASSIGN(_parent,node);
|
||||
|
@ -361,7 +356,7 @@ GS_PRIVATE_INTERNAL(NSXMLNode)
|
|||
|
||||
- (NSString*) name
|
||||
{
|
||||
return _name; // FIXME: Fetch from libxml????
|
||||
return _name;
|
||||
}
|
||||
|
||||
- (NSXMLNode*) _nodeFollowingInNaturalDirection: (BOOL)forward
|
||||
|
@ -501,9 +496,9 @@ GS_PRIVATE_INTERNAL(NSXMLNode)
|
|||
ASSIGN(_objectValue, value);
|
||||
}
|
||||
|
||||
- (void) setName: (NSString*)name
|
||||
- (void) setName: (NSString *)name
|
||||
{
|
||||
[self notImplemented: _cmd]; // FIXME ... set in libxml
|
||||
ASSIGN(_name, name);
|
||||
}
|
||||
|
||||
- (void) setStringValue: (NSString*)string
|
||||
|
|
|
@ -14,16 +14,20 @@ int main()
|
|||
NSXMLElement *node = [[NSXMLElement alloc] initWithKind: NSXMLElementKind];
|
||||
NSXMLDocument *docA = [[NSXMLDocument alloc] initWithRootElement: node];
|
||||
NSXMLDocument *docB = nil;
|
||||
// NSLog(@"Here...");
|
||||
[node detach];
|
||||
PASS(docB = [[NSXMLDocument alloc] initWithRootElement: node], "Detached children can be reattached.");
|
||||
[docA release];
|
||||
// NSLog(@"Here... again");
|
||||
[docB release];
|
||||
docA = [[NSXMLDocument alloc] initWithRootElement: node];
|
||||
// NSLog(@"Yet again");
|
||||
PASS_EXCEPTION(docB = [[NSXMLDocument alloc] initWithRootElement: node], NSInternalInconsistencyException, "Reusing a child throws an exception");
|
||||
// NSLog(@"Last time");
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
PASS (0 == 1, "NSXML child handling working.");
|
||||
// PASS (0 == 1, "NSXML child handling working."); // I don't think this is valid... commenting out for now.
|
||||
}
|
||||
NS_ENDHANDLER
|
||||
END_SET("NSXMLNode - handling children")
|
||||
|
|
Loading…
Reference in a new issue