mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 08:26:27 +00:00
(main): Patched from Scott Christley.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1490 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
5632a32d75
commit
65531e035c
1 changed files with 7 additions and 6 deletions
|
@ -114,7 +114,7 @@ main()
|
|||
|
||||
{
|
||||
// Deriving new arrays
|
||||
NSRange r = NSMakeRange(1, 3);
|
||||
NSRange r = NSMakeRange(0, 3);
|
||||
|
||||
/* Still need to finish the sort* methods
|
||||
[e sortedArrayUsingFunction: context:]
|
||||
|
@ -143,12 +143,12 @@ main()
|
|||
// Joining string elements
|
||||
printf("Method: -componentsJoinedByString:\n");
|
||||
i = [c componentsJoinedByString: @"/"];
|
||||
if ([i isEqual: @"NSMutableArray/NSArray/NSObject"])
|
||||
if ([i isEqual: @"NSObject/NSArray/NSMutableArray"])
|
||||
printf("%s is correct\n", [i cString]);
|
||||
else
|
||||
{
|
||||
printf("Error: %s is not correct\n", [i cString]);
|
||||
printf("Should be NSMutableArray/NSArray/NSObject\n");
|
||||
printf("Should be NSObject/NSArray/NSMutableArray\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -209,7 +209,7 @@ main()
|
|||
|
||||
{
|
||||
// Removing objects
|
||||
unsigned int ind[6] = {7, 4, 1, 3, 5, 0};
|
||||
unsigned int ind[7] = {7, 4, 1, 3, 5, 0, 6};
|
||||
|
||||
printf("Method -removeAllObjects\n");
|
||||
printf("Array count is %d\n", [h count]);
|
||||
|
@ -252,12 +252,13 @@ main()
|
|||
printf("%s ", [i name]);
|
||||
printf("\n");
|
||||
|
||||
printf("Method -removeObjectsFromIndices: {7,4,1,3,5,0} numIndices: 6\n");
|
||||
printf("Method -removeObjectsFromIndices: {7,4,1,3,5,0,6} "
|
||||
"numIndices: 6\n");
|
||||
enumerator = [g objectEnumerator];
|
||||
while ((i = [enumerator nextObject]))
|
||||
printf("%s ", [i name]);
|
||||
printf("\n");
|
||||
[g removeObjectsFromIndices: ind numIndices: 6];
|
||||
[g removeObjectsFromIndices: ind numIndices: 7];
|
||||
enumerator = [g objectEnumerator];
|
||||
while ((i = [enumerator nextObject]))
|
||||
printf("%s ", [i name]);
|
||||
|
|
Loading…
Reference in a new issue