mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-25 01:31:08 +00:00
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32569 72102866-910b-0410-8b05-ffd578937521
24 lines
523 B
Objective-C
24 lines
523 B
Objective-C
#import "Testing.h"
|
|
#import <Foundation/Foundation.h>
|
|
|
|
int main(void)
|
|
{
|
|
START_SET("String throwing")
|
|
#if defined(BASE_NATIVE_OBJC_EXCEPTIONS) && BASE_NATIVE_OBJC_EXCEPTIONS == 1
|
|
id caught = nil;
|
|
id thrown = @"thrown";
|
|
@try
|
|
{
|
|
@throw thrown;
|
|
}
|
|
@catch (id str)
|
|
{
|
|
caught = str;
|
|
}
|
|
PASS((caught == thrown), "Throwing an NSConstantString instance before the class is initialised");
|
|
#else
|
|
SKIP("Native exceptions not supported")
|
|
#endif
|
|
END_SET("String throwing")
|
|
return 0;
|
|
}
|