avoid crash with libobjc2. add comment about OSX inconsistency.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32250 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2011-02-20 20:02:24 +00:00
parent 313cf13c67
commit ceb881bca3

View file

@ -94,6 +94,7 @@ main(int argc, char *argv[])
NSUInteger a;
const char *t0;
const char *t1;
const char *n;
t0 = "1@1:@";
t1 = NSGetSizeAndAlignment(t0, &s, &a);
@ -105,8 +106,14 @@ main(int argc, char *argv[])
"class_isMetaClass() returns NO for Nil");
PASS(Nil == class_getSuperclass(Nil),
"class_getSuperclass() returns NO for Nil");
PASS(strcmp(class_getName(Nil), "nil") == 0,
"class_getName() for Nil is nil");
/* NB. the OSX documentation says that the function returns an empty string
* when given a Nil argument, but the actual behavior on OSX 10.6 is to
* return the string "nil"
*/
PASS_RUNS(n = class_getName(Nil), "class_getName() for Nil does not crash")
PASS(n != 0 && strcmp(n, "nil") == 0, "class_getName() for Nil is nil");
PASS(0 == class_getInstanceVariable(Nil, 0),
"class_getInstanceVariables() for Nil,0 is 0");
PASS(0 == class_getVersion(Nil),