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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 702 jeremybenn
/* Contributed by Nicola Pero - Tue Mar  6 23:05:53 CET 2001 */
2
 
3
#include <objc/objc.h>
4
 
5
/* Tests creating a root class and a minimal subclass tree */
6
 
7
@interface RootClass
8
{
9
  Class isa;
10
}
11
@end
12
 
13
@implementation RootClass
14
@end
15
 
16
@interface SubClassA : RootClass
17
@end
18
 
19
@implementation SubClassA
20
@end
21
 
22
@interface SubClassB : RootClass
23
@end
24
 
25
@implementation SubClassB
26
@end
27
 
28
@interface SubSubClass : SubClassA
29
@end
30
 
31
@implementation SubSubClass
32
@end
33
 
34
#include "class-tests-1.h"
35
 
36
int main (void)
37
{
38
  test_class_with_superclass ("SubClassA", "RootClass");
39
  test_class_with_superclass ("SubClassB", "RootClass");
40
  test_class_with_superclass ("SubSubClass", "SubClassA");
41
 
42
  return 0;
43
}

powered by: WebSVN 2.1.0

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