libs-base/Tests/base/NSKeyedArchiver/basic.m

19 lines
623 B
Mathematica
Raw Normal View History

#import <Foundation/Foundation.h>
#import "ObjectTesting.h"
int main()
{
NSAutoreleasePool *arp = [NSAutoreleasePool new];
2024-11-15 22:31:41 +00:00
test_alloc_only(@"NSKeyedArchiver");
2024-11-15 22:31:41 +00:00
test_NSObject(@"NSKeyedArchiver", [NSArray arrayWithObject:
AUTORELEASE([[NSKeyedArchiver alloc] initForWritingWithMutableData:
[NSMutableData data]])]);
test_alloc_only(@"NSKeyedUnarchiver");
2024-11-15 22:31:41 +00:00
test_NSObject(@"NSKeyedUnarchiver", [NSArray arrayWithObject:
AUTORELEASE([[NSKeyedUnarchiver alloc] initForReadingWithData:
[NSKeyedArchiver archivedDataWithRootObject: [NSData data]]])]);
[arp release]; arp = nil;
return 0;
}