OSDN Git Service

Added.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / objc / execute / _cmd.m
1 /* Contributed by Nicola Pero - Fri Mar  9 19:39:15 CET 2001 */
2 #include <objc/objc.h>
3 #include <objc/objc-api.h>
4
5 /* Test the hidden argument _cmd to method calls */
6
7 @interface TestClass 
8 {
9   Class isa;
10 }
11 + (const char*) method;
12 @end
13
14 @implementation TestClass
15 + (const char*) method;
16 {
17   return sel_get_name (_cmd);
18 }
19 @end
20
21
22 int main (void)
23 {
24   if (strcmp ([TestClass method], "method"))
25     {
26       abort ();
27     }
28
29   return 0;
30 }