cleanup to avoid tests which won't work on most systems

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32687 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2011-03-22 19:59:36 +00:00
parent 224616a0f2
commit 7d51172308
5 changed files with 16 additions and 1 deletions

View file

@ -4,9 +4,11 @@
#if !__has_feature(objc_nonfragile_abi)
int main(void)
{
#if defined(TESTDEV)
START_SET("String throwing")
SKIP("Unified exception model not supported")
END_SET("String throwing");
#endif
return 0;
}
@ -21,6 +23,7 @@ int main(void)
*/
int main(void)
{
#if defined(TESTDEV)
NSString *foo = @"foo";
id caught = nil;
int final = 0;
@ -61,6 +64,7 @@ int main(void)
PASS(0==final, "catchall not used to catch object");
PASS(0==wrongCatch, "Incorrect object catch not used to catch object");
PASS(caught == foo, "Unified exception model works correctly");
#endif
return 0;
}
#endif

View file

@ -7,9 +7,11 @@ extern "C"
#if !__has_feature(objc_nonfragile_abi)
int main(void)
{
#if defined(TESTDEV)
START_SET("String throwing")
SKIP("Unified exception model not supported")
END_SET("String throwing");
#endif
return 0;
}
@ -54,6 +56,7 @@ void testThrow(void)
*/
int main(void)
{
#if defined(TESTDEV)
testThrow();
PASS(0==final, "catchall not used to catch object");
PASS(caughtObj == nil, "Thrown string cast to NSObject matched NSObject (Apple mode)");
@ -65,6 +68,7 @@ int main(void)
PASS(0==final, "catchall not used to catch object");
PASS(caughtObj == foo, "Thrown string cast to NSObject matched NSObject (sane mode)");
PASS(caughtStr == nil, "Thrown string cast to NSObject matched NSString (sane mode)");
#endif
#endif
return 0;
}

View file

@ -4,9 +4,11 @@
#if !__has_feature(objc_nonfragile_abi)
int main(void)
{
#if defined(TESTDEV)
START_SET("Unified exception model")
SKIP("Unified exception model not supported")
END_SET("Unified exception model")
#endif
return 0;
}
@ -24,6 +26,7 @@ int main(void)
*/
int main(void)
{
#if defined(TESTDEV)
NSString *foo = @"foo";
id caught = nil;
int final = 0;
@ -47,6 +50,7 @@ int main(void)
PASS(0==final, "catchall not used to catch object");
PASS(0==wrongCatch, "Incorrect object catch not used to catch object");
PASS(caught == foo, "Unified exception model works correctly");
#endif
return 0;
}
#endif

View file

@ -66,10 +66,13 @@ class A1
@implementation C @end
int main(void)
{
#if defined(TESTDEV)
// Make sure constructors / destructors are called even without -init
[[C alloc] release];
// Reset state
A_init = B_init = A_destroyed = B_destroyed = 0;
// Check init is called in the middle
[[C new] release];
#endif
return 0;
}

View file

@ -52,7 +52,7 @@ int main()
START_SET("NSLocale")
if (!NSLOCALE_SUPPORTED)
SKIP("NSlocale not supported\nThe ICU library was not available when GNUstep-base was built")
SKIP("NSLocale not supported\nThe ICU library was not available when GNUstep-base was built")
current = [NSTimeZone timeZoneWithName: @"America/Sao_Paulo"];
locale = [[NSLocale alloc] initWithLocaleIdentifier: @"en_GB"];