mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-04 05:40:54 +00:00
25 lines
432 B
Mathematica
25 lines
432 B
Mathematica
|
#import "Testing.h"
|
||
|
#import <Foundation/Foundation.h>
|
||
|
|
||
|
int main(void)
|
||
|
{
|
||
|
#if BASE_NATIVE_OBJC_EXCEPTIONS == 1
|
||
|
id caught = nil;
|
||
|
id thrown = @"thrown";
|
||
|
@try
|
||
|
{
|
||
|
@throw thrown;
|
||
|
}
|
||
|
@catch (id str)
|
||
|
{
|
||
|
caught = str;
|
||
|
}
|
||
|
[NSAutoreleasePool new];
|
||
|
PASS((caught == thrown), "Throwing an NSConstantString instance before the class is initialised");
|
||
|
#else
|
||
|
[NSAutoreleasePool new];
|
||
|
unsupported("Native exceptions");
|
||
|
#endif
|
||
|
return 0;
|
||
|
}
|