Debian Codegraph @

gcc/testsuite/obj-c++.dg/class-extension-1.mm

raw
1 /* Contributed by Nicola Pero <[email protected]>, December 2010. */
2 /* { dg-do compile } */
3 // { dg-additional-options "-Wno-objc-root-class" }
4
5 /* This test tests the basic of class extensions. */
6
7 #include <objc/objc.h>
8
9 @interface MyObject
10 {
11 Class isa;
12 }
13 - (int) test;
14 @end
15
16 @interface MyObject ()
17 - (int) test2;
18 - (int) test3;
19 @end
20
21 @implementation MyObject
22 - (int) test
23 {
24 return 20;
25 }
26 - (int) test2
27 {
28 return 20;
29 }
30 @end /* { dg-warning "incomplete implementation of class .MyObject." } */
31 /* { dg-warning "method definition for .-test3. not found" "" { target *-*-* } .-1 } */