mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-29 19:41:00 +00:00
35 lines
441 B
Mathematica
35 lines
441 B
Mathematica
|
#import <Foundation/Foundation.h>
|
||
|
#import "Testing.h"
|
||
|
|
||
|
static int called = 0;
|
||
|
|
||
|
@interface NSMessageTest : NSObject
|
||
|
@end
|
||
|
|
||
|
@implementation NSMessageTest
|
||
|
|
||
|
- (void) methodToCall
|
||
|
{
|
||
|
called++;
|
||
|
}
|
||
|
|
||
|
@end
|
||
|
|
||
|
|
||
|
|
||
|
int main(void)
|
||
|
{
|
||
|
NSAutoreleasePool* pool = [NSAutoreleasePool new];
|
||
|
NSMessageTest* test = [NSMessageTest new];
|
||
|
|
||
|
[NS_MESSAGE(test, methodToCall) invoke];
|
||
|
|
||
|
PASS(called > 0, "NS_MESSAGE worked");
|
||
|
|
||
|
[pool release];
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
|
||
|
|