mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 02:20:48 +00:00
* Tests/gui/NSImage/basic.m: Add basic tests for NSImage.
* Tests/gui/NSCell/basic.m: Extend basic tests for NSCell. * Source/NSImage.m: Try to correct keyed encoding/decoding. Add incomplete isEqual: method. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36384 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
0334fe3bca
commit
e45644b3fd
5 changed files with 172 additions and 49 deletions
|
@ -3,23 +3,33 @@
|
|||
#import <Foundation/NSAutoreleasePool.h>
|
||||
#import <AppKit/NSApplication.h>
|
||||
#import <AppKit/NSCell.h>
|
||||
#import <AppKit/NSImage.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||
id testObject;
|
||||
id testObject1;
|
||||
id testObject2;
|
||||
NSArray *testObjects;
|
||||
|
||||
[NSApplication sharedApplication];
|
||||
testObject = [NSCell new];
|
||||
|
||||
test_alloc(@"NSCell");
|
||||
test_NSObject(@"NSCell",[NSArray arrayWithObject:testObject]);
|
||||
test_NSCoding([NSArray arrayWithObject:testObject]);
|
||||
test_keyed_NSCoding([NSArray arrayWithObject:testObject]);
|
||||
|
||||
testObject = [NSCell new];
|
||||
testObject1 = [[NSCell alloc] initImageCell: [NSImage imageNamed: @"GNUstep"]];
|
||||
testObject2 = [[NSCell alloc] initTextCell: @"GNUstep"];
|
||||
|
||||
testObjects = [NSArray arrayWithObjects: testObject, testObject1, testObject2, nil];
|
||||
test_NSObject(@"NSCell", testObjects);
|
||||
test_NSCoding(testObjects);
|
||||
test_keyed_NSCoding(testObjects);
|
||||
test_NSCopying(@"NSCell",
|
||||
@"NSCell",
|
||||
[NSArray arrayWithObject:testObject], NO, NO);
|
||||
testObjects, NO, NO);
|
||||
|
||||
[arp release]; arp = nil;
|
||||
[arp release];
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -35,6 +45,11 @@ int main()
|
|||
return NO;
|
||||
if (![[anObject title] isEqual: [self title]])
|
||||
return NO;
|
||||
if (!([anObject image] == [self image]) && ![[anObject image] isEqual: [self image]])
|
||||
{
|
||||
NSLog(@"image differ %@ %@", [self image], [anObject image]);
|
||||
return NO;
|
||||
}
|
||||
if ([anObject type] != [self type])
|
||||
return NO;
|
||||
if ([anObject tag] != [self tag])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue