mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-29 11:31:11 +00:00
being confusing. They now both take a simple C-string argument which names the set, and the macros check that each end matches a start of the same name. Since tis means that a START_SET no longer takes an argument sayng whether or notthe set is to be skipped, we now have a SKIP macro to be used inside a set to skip to the end of it. This is actually more versatile as we can have multiple SKIP macros in the same set, each providing a different reason for the set being skipped. Also removed a few obsolete/unused functions and macros. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32355 72102866-910b-0410-8b05-ffd578937521
25 lines
771 B
Objective-C
25 lines
771 B
Objective-C
#import <Foundation/NSKeyedArchiver.h>
|
|
#import <Foundation/NSException.h>
|
|
#import <Foundation/NSAutoreleasePool.h>
|
|
#import <Foundation/NSData.h>
|
|
#import "Testing.h"
|
|
#import "ObjectTesting.h"
|
|
|
|
int main()
|
|
{
|
|
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
|
id obj;
|
|
NSMutableData *data1;
|
|
|
|
obj = [NSKeyedArchiver alloc];
|
|
data1 = [NSMutableData dataWithLength: 0];
|
|
obj = [obj initForWritingWithMutableData: data1];
|
|
PASS((obj != nil && [obj isKindOfClass:[NSKeyedArchiver class]]), "-initForWritingWithMutableData seems ok");
|
|
|
|
PASS_EXCEPTION([[NSUnarchiver alloc] initForReadingWithData:nil];,
|
|
@"NSInvalidArgumentException",
|
|
"Creating an NSUnarchiver with nil data throws an exception");
|
|
|
|
[arp release]; arp = nil;
|
|
return 0;
|
|
}
|