Replace absolute linenrs in objc.dg,obj-c++.dg
[official-gcc.git] / gcc / testsuite / objc.dg / missing-proto-3.m
blob05e1a258183c9a8df6e3ce0d354917d4a726c9fd
1 /* Ensure that the compiler gracefully handles missing protocol declarations.
2    In addition to not crashing :-), the compiler should properly handle
3    valid protocol references, even when they're mixed with invalid ones.  */
4 /* { dg-do compile } */
5  
6 #include <objc/objc.h>
8 @protocol DefinedProtocol
9 - (id) missingMethod1;
10 @end
12 @interface MyClass <UndefinedProtocol, DefinedProtocol>
13 /* { dg-error "cannot find protocol declaration for .UndefinedProtocol." "" { target *-*-* } .-1 } */
14 @end
16 @implementation MyClass
17 +(Class)class
19   return self;
21 @end
22 /* { dg-warning "incomplete implementation of class .MyClass." "" { target *-*-* } .-1 } */
23 /* { dg-warning "method definition for .\\-missingMethod1. not found" "" { target *-*-* } .-2 } */
24 /* { dg-warning "class .MyClass. does not fully implement the .DefinedProtocol. protocol" "" { target *-*-* } .-3 } */