mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
Fix NSDictionary and NSMutableDictionary implementation.
NSCharacterSet searches in appropriate places for resources. NSBundle no longer supports GNUSTEP_LIBRARY_PATH variable. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2519 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
04e12e7ff5
commit
a02a4e9e88
19 changed files with 383 additions and 152 deletions
|
@ -73,7 +73,7 @@ thread-except \
|
|||
nscharacterset \
|
||||
NSData-test
|
||||
|
||||
# The Objective-C source files to be compiled
|
||||
# The tool Objective-C source files to be compiled
|
||||
test01_OBJC_FILES = test01.m
|
||||
test02_OBJC_FILES = test02.m
|
||||
heap_OBJC_FILES = heap.m
|
||||
|
@ -117,12 +117,21 @@ thread-except_OBJC_FILES = thread-except.m
|
|||
nscharacterset_OBJC_FILES = nscharacterset.m
|
||||
NSData-test_OBJC_FILES = NSData-test.m
|
||||
|
||||
# The bundles to be compiled
|
||||
BUNDLE_NAME=LoadMe
|
||||
|
||||
# The bundle Objective-C source files to be compiled
|
||||
LoadMe_OBJC_FILES = LoadMe.m MyCategory.m SecondClass.m
|
||||
|
||||
# The bundle resource files and directories
|
||||
LoadMe_RESOURCES = English.lproj/NXStringTable.example
|
||||
LoadMe_RESOURCE_DIRS = English.lproj
|
||||
|
||||
SRCS = $(TOOL_NAME:=.m)
|
||||
|
||||
HDRS = \
|
||||
server.h
|
||||
|
||||
BUNDLE_NAME=LoadMe
|
||||
DYNAMIC_MFILES = \
|
||||
LoadMe.m \
|
||||
MyCategory.m \
|
||||
|
@ -139,5 +148,6 @@ DIST_FILES = $(SRCS) $(HDRS) $(DYNAMIC_MFILES) $(DYNAMIC_HFILES) \
|
|||
-include Makefile.preamble
|
||||
|
||||
include $(GNUSTEP_SYSTEM_ROOT)/Makefiles/tool.make
|
||||
include $(GNUSTEP_SYSTEM_ROOT)/Makefiles/bundle.make
|
||||
|
||||
-include Makefile.postamble
|
||||
|
|
|
@ -14,7 +14,7 @@ main()
|
|||
id o1, o2, o3;
|
||||
unsigned int p;
|
||||
|
||||
behavior_set_debug(1);
|
||||
behavior_set_debug(0);
|
||||
|
||||
[NSAutoreleasePool enableDoubleReleaseCheck:YES];
|
||||
pool = [[NSAutoreleasePool alloc] init];
|
||||
|
|
|
@ -9,6 +9,7 @@ main()
|
|||
id enumerator;
|
||||
id objects, keys;
|
||||
id key;
|
||||
BOOL ok;
|
||||
|
||||
behavior_set_debug(0);
|
||||
|
||||
|
@ -38,6 +39,10 @@ main()
|
|||
|
||||
b = [a mutableCopy];
|
||||
assert([b count]);
|
||||
|
||||
ok = [b isEqual: a];
|
||||
assert(ok);
|
||||
|
||||
[b setObject:@"formi" forKey:@"ant"];
|
||||
[b removeObjectForKey:@"horse"];
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include <Foundation/NSException.h>
|
||||
#include <Foundation/NSString.h>
|
||||
#include <Foundation/NSGeometry.h>
|
||||
#include <Foundation/NSArray.h>
|
||||
|
||||
|
||||
int main()
|
||||
|
@ -14,11 +15,15 @@ int main()
|
|||
NSPoint p;
|
||||
NSRect rect;
|
||||
NSValue *v1, *v2;
|
||||
NSNumber *n1, *n2;
|
||||
NSNumber *n1, *n2, *n3, *n4, *n5;
|
||||
NSArray *a1, *a2;
|
||||
|
||||
// Numbers
|
||||
n1 = [NSNumber numberWithUnsignedShort:30];
|
||||
n2 = [NSNumber numberWithDouble:2.7];
|
||||
n3 = [NSNumber numberWithDouble:30];
|
||||
n4 = [NSNumber numberWithChar:111];
|
||||
n5 = [NSNumber numberWithChar:111];
|
||||
printf("Number(n1) as int %d, as float %f\n",
|
||||
[n1 intValue], [n1 floatValue]);
|
||||
printf("n1 times n2=%f as int to get %d\n",
|
||||
|
@ -26,7 +31,34 @@ int main()
|
|||
printf("n2 as string: %s\n", [[n2 stringValue] cString]);
|
||||
printf("n2 compare:n1 is %d\n", [n2 compare:n1]);
|
||||
printf("n1 compare:n2 is %d\n", [n1 compare:n2]);
|
||||
printf("n1 isEqual:n3 is %d\n", [n1 isEqual:n3]);
|
||||
printf("n4 isEqual:n5 is %d\n", [n4 isEqual:n5]);
|
||||
|
||||
a1 = [NSArray arrayWithObjects:
|
||||
[NSNumber numberWithChar: 111],
|
||||
[NSNumber numberWithUnsignedChar: 112],
|
||||
[NSNumber numberWithShort: 121],
|
||||
[NSNumber numberWithUnsignedShort: 122],
|
||||
[NSNumber numberWithInt: 131],
|
||||
[NSNumber numberWithUnsignedInt: 132],
|
||||
[NSNumber numberWithInt: 141],
|
||||
[NSNumber numberWithUnsignedInt: 142],
|
||||
[NSNumber numberWithFloat: 151],
|
||||
[NSNumber numberWithDouble: 152], nil];
|
||||
|
||||
a2 = [NSArray arrayWithObjects:
|
||||
[NSNumber numberWithChar: 111],
|
||||
[NSNumber numberWithUnsignedChar: 112],
|
||||
[NSNumber numberWithShort: 121],
|
||||
[NSNumber numberWithUnsignedShort: 122],
|
||||
[NSNumber numberWithInt: 131],
|
||||
[NSNumber numberWithUnsignedInt: 132],
|
||||
[NSNumber numberWithInt: 141],
|
||||
[NSNumber numberWithUnsignedInt: 142],
|
||||
[NSNumber numberWithFloat: 151],
|
||||
[NSNumber numberWithDouble: 152], nil];
|
||||
|
||||
printf("a1 isEqual:a2 is %d\n", [a1 isEqual:a2]);
|
||||
|
||||
// Test values, Geometry
|
||||
rect = NSMakeRect(1.0, 103.3, 40.0, 843.);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue