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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [objc/] [execute/] [_cmd.m] - Blame information for rev 702

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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