libs-base/Tests/base/NSXMLDocument/basic.m
rfm 0681b25521 fix typo
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34426 72102866-910b-0410-8b05-ffd578937521
2012-01-05 20:46:51 +00:00

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;
}