mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-01 17:12:03 +00:00
add some keyed coding tests
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@36424 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
162e32d271
commit
983edbe0ef
14 changed files with 18 additions and 2 deletions
|
@ -61,6 +61,7 @@ int main()
|
||||||
|
|
||||||
test_NSObject(@"NSAffineTransform", testObjs);
|
test_NSObject(@"NSAffineTransform", testObjs);
|
||||||
test_NSCoding(testObjs);
|
test_NSCoding(testObjs);
|
||||||
|
// test_keyed_NSCoding(testObjs);
|
||||||
test_NSCopying(@"NSAffineTransform", @"NSAffineTransform", testObjs, NO, YES);
|
test_NSCopying(@"NSAffineTransform", @"NSAffineTransform", testObjs, NO, YES);
|
||||||
|
|
||||||
testObj = [NSAffineTransform transform];
|
testObj = [NSAffineTransform transform];
|
||||||
|
|
|
@ -18,6 +18,7 @@ int main()
|
||||||
[testObjs addObject: obj];
|
[testObjs addObject: obj];
|
||||||
test_NSObject(@"NSArray", testObjs);
|
test_NSObject(@"NSArray", testObjs);
|
||||||
test_NSCoding(testObjs);
|
test_NSCoding(testObjs);
|
||||||
|
test_keyed_NSCoding(testObjs);
|
||||||
test_NSCopying(@"NSArray",@"NSMutableArray",testObjs,YES,NO);
|
test_NSCopying(@"NSArray",@"NSMutableArray",testObjs,YES,NO);
|
||||||
test_NSMutableCopying(@"NSArray",@"NSMutableArray",testObjs);
|
test_NSMutableCopying(@"NSArray",@"NSMutableArray",testObjs);
|
||||||
|
|
||||||
|
@ -28,7 +29,7 @@ int main()
|
||||||
* mutable array ... we currently copy that
|
* mutable array ... we currently copy that
|
||||||
*/
|
*/
|
||||||
PASS([obj isKindOfClass: [NSMutableArray class]] == YES,"array mutable");
|
PASS([obj isKindOfClass: [NSMutableArray class]] == YES,"array mutable");
|
||||||
PASS_RUNS([obj addObject: @"x"],"can add to array");
|
PASS_RUNS([(NSMutableArray*)obj addObject: @"x"],"can add to array");
|
||||||
#else
|
#else
|
||||||
PASS([obj isKindOfClass: [NSMutableArray class]] == NO,"array immutable");
|
PASS([obj isKindOfClass: [NSMutableArray class]] == NO,"array immutable");
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -9,6 +9,7 @@ int main()
|
||||||
test_alloc(@"NSAttributedString");
|
test_alloc(@"NSAttributedString");
|
||||||
test_NSObject(@"NSAttributedString", arr);
|
test_NSObject(@"NSAttributedString", arr);
|
||||||
test_NSCoding(arr);
|
test_NSCoding(arr);
|
||||||
|
test_keyed_NSCoding(arr);
|
||||||
test_NSCopying(@"NSAttributedString",@"NSMutableAttributedString",arr,NO, NO);
|
test_NSCopying(@"NSAttributedString",@"NSMutableAttributedString",arr,NO, NO);
|
||||||
test_NSMutableCopying(@"NSAttributedString",@"NSMutableAttributedString",arr);
|
test_NSMutableCopying(@"NSAttributedString",@"NSMutableAttributedString",arr);
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@ int main()
|
||||||
test_alloc(@"NSData");
|
test_alloc(@"NSData");
|
||||||
test_NSObject(@"NSData",[NSArray arrayWithObject:testObject]);
|
test_NSObject(@"NSData",[NSArray arrayWithObject:testObject]);
|
||||||
test_NSCoding([NSArray arrayWithObject:testObject]);
|
test_NSCoding([NSArray arrayWithObject:testObject]);
|
||||||
|
test_keyed_NSCoding([NSArray arrayWithObject:testObject]);
|
||||||
test_NSCopying(@"NSData",
|
test_NSCopying(@"NSData",
|
||||||
@"NSMutableData",
|
@"NSMutableData",
|
||||||
[NSArray arrayWithObject:testObject], NO, NO);
|
[NSArray arrayWithObject:testObject], NO, NO);
|
||||||
|
|
|
@ -9,6 +9,7 @@ int main()
|
||||||
|
|
||||||
test_NSObject(@"NSDate",[NSArray arrayWithObject:[NSDate new]]);
|
test_NSObject(@"NSDate",[NSArray arrayWithObject:[NSDate new]]);
|
||||||
test_NSCoding([NSArray arrayWithObject:testObj]);
|
test_NSCoding([NSArray arrayWithObject:testObj]);
|
||||||
|
test_keyed_NSCoding([NSArray arrayWithObject:testObj]);
|
||||||
test_NSCopying(@"NSDate",@"NSDate",[NSArray arrayWithObject:testObj],NO,NO);
|
test_NSCopying(@"NSDate",@"NSDate",[NSArray arrayWithObject:testObj],NO,NO);
|
||||||
|
|
||||||
[arp release]; arp = nil;
|
[arp release]; arp = nil;
|
||||||
|
|
|
@ -26,6 +26,7 @@ int main()
|
||||||
|
|
||||||
test_NSObject(@"NSDictionary", testObjs);
|
test_NSObject(@"NSDictionary", testObjs);
|
||||||
test_NSCoding(testObjs);
|
test_NSCoding(testObjs);
|
||||||
|
test_keyed_NSCoding(testObjs);
|
||||||
test_NSCopying(@"NSDictionary", @"NSMutableDictionary", testObjs, YES, NO);
|
test_NSCopying(@"NSDictionary", @"NSMutableDictionary", testObjs, YES, NO);
|
||||||
test_NSMutableCopying(@"NSDictionary", @"NSMutableDictionary", testObjs);
|
test_NSMutableCopying(@"NSDictionary", @"NSMutableDictionary", testObjs);
|
||||||
START_SET("NSArray subscripting")
|
START_SET("NSArray subscripting")
|
||||||
|
|
|
@ -9,6 +9,7 @@ int main()
|
||||||
test_alloc(@"NSMutableArray");
|
test_alloc(@"NSMutableArray");
|
||||||
test_NSObject(@"NSMutableArray", [NSArray arrayWithObject:testObj]);
|
test_NSObject(@"NSMutableArray", [NSArray arrayWithObject:testObj]);
|
||||||
test_NSCoding([NSArray arrayWithObject:testObj]);
|
test_NSCoding([NSArray arrayWithObject:testObj]);
|
||||||
|
test_keyed_NSCoding([NSArray arrayWithObject:testObj]);
|
||||||
test_NSCopying(@"NSArray",@"NSMutableArray",
|
test_NSCopying(@"NSArray",@"NSMutableArray",
|
||||||
[NSArray arrayWithObject:testObj], NO, NO);
|
[NSArray arrayWithObject:testObj], NO, NO);
|
||||||
test_NSMutableCopying(@"NSArray",@"NSMutableArray",
|
test_NSMutableCopying(@"NSArray",@"NSMutableArray",
|
||||||
|
|
|
@ -9,6 +9,7 @@ int main()
|
||||||
test_alloc(@"NSMutableAttributedString");
|
test_alloc(@"NSMutableAttributedString");
|
||||||
test_NSObject(@"NSMutableAttributedString", arr);
|
test_NSObject(@"NSMutableAttributedString", arr);
|
||||||
test_NSCoding(arr);
|
test_NSCoding(arr);
|
||||||
|
test_keyed_NSCoding(arr);
|
||||||
test_NSCopying(@"NSAttributedString",@"NSMutableAttributedString",arr,NO, NO);
|
test_NSCopying(@"NSAttributedString",@"NSMutableAttributedString",arr,NO, NO);
|
||||||
test_NSMutableCopying(@"NSAttributedString",@"NSMutableAttributedString",arr);
|
test_NSMutableCopying(@"NSAttributedString",@"NSMutableAttributedString",arr);
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,8 @@ int main()
|
||||||
test_NSObject(@"NSMutableDictionary", [NSArray arrayWithObject:testObj]);
|
test_NSObject(@"NSMutableDictionary", [NSArray arrayWithObject:testObj]);
|
||||||
|
|
||||||
test_NSCoding([NSArray arrayWithObject:testObj]);
|
test_NSCoding([NSArray arrayWithObject:testObj]);
|
||||||
|
|
||||||
|
test_keyed_NSCoding([NSArray arrayWithObject:testObj]);
|
||||||
|
|
||||||
test_NSCopying(@"NSDictionary",@"NSMutableDictionary",
|
test_NSCopying(@"NSDictionary",@"NSMutableDictionary",
|
||||||
[NSArray arrayWithObject:testObj], NO, NO);
|
[NSArray arrayWithObject:testObj], NO, NO);
|
||||||
|
|
|
@ -75,6 +75,7 @@ int main()
|
||||||
test_alloc(@"NSMutableString");
|
test_alloc(@"NSMutableString");
|
||||||
testObj = [[NSMutableString alloc] initWithCString:"Hello\n"];
|
testObj = [[NSMutableString alloc] initWithCString:"Hello\n"];
|
||||||
test_NSCoding([NSArray arrayWithObject:testObj]);
|
test_NSCoding([NSArray arrayWithObject:testObj]);
|
||||||
|
test_keyed_NSCoding([NSArray arrayWithObject:testObj]);
|
||||||
test_NSCopying(@"NSString",@"NSMutableString",
|
test_NSCopying(@"NSString",@"NSMutableString",
|
||||||
[NSArray arrayWithObject:testObj],NO,NO);
|
[NSArray arrayWithObject:testObj],NO,NO);
|
||||||
test_NSMutableCopying(@"NSString",@"NSMutableString",
|
test_NSMutableCopying(@"NSString",@"NSMutableString",
|
||||||
|
|
|
@ -19,6 +19,7 @@ int main()
|
||||||
|
|
||||||
test_NSObject(@"NSSet", testObjs);
|
test_NSObject(@"NSSet", testObjs);
|
||||||
test_NSCoding(testObjs);
|
test_NSCoding(testObjs);
|
||||||
|
test_keyed_NSCoding(testObjs);
|
||||||
test_NSCopying(@"NSSet", @"NSMutableSet", testObjs, YES, NO);
|
test_NSCopying(@"NSSet", @"NSMutableSet", testObjs, YES, NO);
|
||||||
test_NSMutableCopying(@"NSSet", @"NSMutableSet", testObjs);
|
test_NSMutableCopying(@"NSSet", @"NSMutableSet", testObjs);
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@ int main()
|
||||||
array = [NSArray arrayWithObject: s1];
|
array = [NSArray arrayWithObject: s1];
|
||||||
test_NSObject(@"NSSortDescriptor", array);
|
test_NSObject(@"NSSortDescriptor", array);
|
||||||
test_NSCoding(array);
|
test_NSCoding(array);
|
||||||
|
test_keyed_NSCoding(array);
|
||||||
test_NSCopying(@"NSSortDescriptor", @"NSSortDescriptor", array, NO, NO);
|
test_NSCopying(@"NSSortDescriptor", @"NSSortDescriptor", array, NO, NO);
|
||||||
|
|
||||||
s2 = [[NSSortDescriptor alloc] initWithKey: @"name" ascending: YES];
|
s2 = [[NSSortDescriptor alloc] initWithKey: @"name" ascending: YES];
|
||||||
|
|
|
@ -7,11 +7,13 @@ int main()
|
||||||
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||||
NSInputStream *t1;
|
NSInputStream *t1;
|
||||||
NSOutputStream *t2;
|
NSOutputStream *t2;
|
||||||
|
NSArray *a;
|
||||||
NSHost *host = [NSHost hostWithName:@"localhost"];
|
NSHost *host = [NSHost hostWithName:@"localhost"];
|
||||||
|
|
||||||
[NSStream getStreamsToHost:host port:80 inputStream:&t1 outputStream:&t2];
|
[NSStream getStreamsToHost:host port:80 inputStream:&t1 outputStream:&t2];
|
||||||
|
|
||||||
test_NSObject(@"NSStream", [NSArray arrayWithObjects:t1, t2, nil]);
|
a = [NSArray arrayWithObjects:t1, t2, nil];
|
||||||
|
test_NSObject(@"NSStream", a);
|
||||||
|
|
||||||
[arp release]; arp = nil;
|
[arp release]; arp = nil;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -14,6 +14,7 @@ int main()
|
||||||
test_alloc(@"NSString");
|
test_alloc(@"NSString");
|
||||||
test_NSObject(@"NSString",[NSArray arrayWithObject:testObj]);
|
test_NSObject(@"NSString",[NSArray arrayWithObject:testObj]);
|
||||||
test_NSCoding([NSArray arrayWithObject:testObj]);
|
test_NSCoding([NSArray arrayWithObject:testObj]);
|
||||||
|
test_keyed_NSCoding([NSArray arrayWithObject:testObj]);
|
||||||
test_NSCopying(@"NSString", @"NSMutableString",
|
test_NSCopying(@"NSString", @"NSMutableString",
|
||||||
[NSArray arrayWithObject:testObj], NO, NO);
|
[NSArray arrayWithObject:testObj], NO, NO);
|
||||||
test_NSMutableCopying(@"NSString", @"NSMutableString",
|
test_NSMutableCopying(@"NSString", @"NSMutableString",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue