Added.
From-SVN: r36727
This commit is contained in:
parent
b8fbe62c82
commit
ab9b1e4239
2 changed files with 60 additions and 0 deletions
31
gcc/testsuite/objc/execute/np-1.m
Normal file
31
gcc/testsuite/objc/execute/np-1.m
Normal file
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* Contributed by Nicola Pero <n.pero@mi.flashnet.it>
|
||||
* Tue Sep 19 4:29AM
|
||||
*/
|
||||
|
||||
#include <objc/objc.h>
|
||||
#include <objc/Protocol.h>
|
||||
|
||||
@protocol MyProtocol
|
||||
- (oneway void) methodA;
|
||||
@end
|
||||
|
||||
@interface MyObject <MyProtocol>
|
||||
@end
|
||||
|
||||
@implementation MyObject
|
||||
- (oneway void) methodA
|
||||
{
|
||||
}
|
||||
@end
|
||||
|
||||
int main (void)
|
||||
{
|
||||
MyObject *object = nil;
|
||||
|
||||
[object methodA];
|
||||
|
||||
exit (0);
|
||||
}
|
||||
|
||||
|
29
gcc/testsuite/objc/execute/np-2.m
Normal file
29
gcc/testsuite/objc/execute/np-2.m
Normal file
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* Contributed by Nicola Pero <n.pero@mi.flashnet.it>
|
||||
* Tue Sep 19 4:34AM
|
||||
*/
|
||||
#include <objc/objc.h>
|
||||
#include <objc/Protocol.h>
|
||||
|
||||
@protocol MyProtocol
|
||||
+ (oneway void) methodA;
|
||||
@end
|
||||
|
||||
@interface MyObject <MyProtocol>
|
||||
@end
|
||||
|
||||
@implementation MyObject
|
||||
+ (oneway void) methodA
|
||||
{
|
||||
printf ("methodA\n");
|
||||
}
|
||||
@end
|
||||
|
||||
int main (void)
|
||||
{
|
||||
[MyObject methodA];
|
||||
|
||||
exit (0);
|
||||
}
|
||||
|
||||
|
Loading…
Add table
Reference in a new issue