mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
add trivial document tests
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34422 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
7620644234
commit
b9ce94a828
2 changed files with 28 additions and 0 deletions
0
Tests/base/NSXMLDocument/TestInfo
Normal file
0
Tests/base/NSXMLDocument/TestInfo
Normal file
28
Tests/base/NSXMLDocument/basic.m
Normal file
28
Tests/base/NSXMLDocument/basic.m
Normal file
|
@ -0,0 +1,28 @@
|
|||
#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 initWithDate: nil options: 0 error: 0],
|
||||
NSInvalidArgumentException,
|
||||
"Cannot initialise an XML document with nil data");
|
||||
|
||||
node = [NSXMLDocument alloc];
|
||||
PASS_EXCEPTION([node initWithDate: (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;
|
||||
}
|
Loading…
Reference in a new issue