OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [objc/] [execute/] [class-3.m] - Blame information for rev 378

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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