OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [objc/] [execute/] [_cmd.m] - Blame information for rev 826

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 307 jeremybenn
/* Contributed by Nicola Pero - Fri Mar  9 19:39:15 CET 2001 */
2
 
3
#include <stdlib.h>
4
#include "../../objc-obj-c++-shared/next-mapping.h"
5
#include <objc/objc-api.h>
6
 
7
/* Test the hidden argument _cmd to method calls */
8
 
9
@interface TestClass
10
{
11
  Class isa;
12
}
13
+ (const char*) method;
14
@end
15
 
16
@implementation TestClass
17
+ (const char*) method
18
{
19
  return sel_get_name (_cmd);
20
}
21
#ifdef __NEXT_RUNTIME__
22
+ initialize { return self; }
23
#endif
24
@end
25
 
26
 
27
int main (void)
28
{
29
  if (strcmp ([TestClass method], "method"))
30
    {
31
      abort ();
32
    }
33
 
34
  return 0;
35
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.