mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-28 11:10:51 +00:00
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34426 72102866-910b-0410-8b05-ffd578937521
28 lines
786 B
Objective-C
28 lines
786 B
Objective-C
#import "ObjectTesting.h"
|
|
#import <Foundation/NSAutoreleasePool.h>
|
|
#import <Foundation/NSXMLDocument.h>
|
|
|
|
int main()
|
|
{
|
|
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
|
NSXMLDocument *node;
|
|
|
|
node = [NSXMLDocument alloc];
|
|
PASS_EXCEPTION([node initWithData: nil options: 0 error: 0],
|
|
NSInvalidArgumentException,
|
|
"Cannot initialise an XML document with nil data");
|
|
|
|
node = [NSXMLDocument alloc];
|
|
PASS_EXCEPTION([node initWithData: (NSData*)@"bad" options: 0 error: 0],
|
|
NSInvalidArgumentException,
|
|
"Cannot initialise an XML document with bad data class");
|
|
|
|
node = [[NSXMLDocument alloc] init];
|
|
test_alloc(@"NSXMLNode");
|
|
test_NSObject(@"NSXMLNode", [NSArray arrayWithObject: node]);
|
|
[arp release];
|
|
arp = nil;
|
|
|
|
[node release];
|
|
return 0;
|
|
}
|