2 // RUN: %clang_cc1 -objcmt-migrate-protocol-conformance -mt-migrate-directory %t %s -x objective-c -fobjc-runtime-has-weak -fobjc-arc -triple x86_64-apple-darwin11
3 // RUN: c-arcmt-test -mt-migrate-directory %t | arcmt-test -verify-transformed-files %s.result
4 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -x objective-c -fobjc-runtime-has-weak -fobjc-arc %s.result
6 @interface NSObject @end
9 - (id) Meth1: (double) arg;
12 @interface Test1<P> // Test for no super class and no protocol list
16 - (id) Meth1: (double) arg { return 0; }
22 @interface Test2 <P1, P2, P> // Test for no super class and with protocol list
30 - (id) Meth1: (double) arg { return 0; }
33 @interface Test3 : NSObject<P> { // Test for Super class and no protocol list
39 - (id) Meth1: (double) arg { return 0; }
42 @interface Test4 : NSObject <P1, P2, P> // Test for Super class and protocol list
46 - (id) Meth1: (double) arg { return 0; }
49 // Test5 - conforms to P3 because it implement's P3's property.
51 @property (copy) id Prop;
55 @property (copy) id Prop;
58 @interface Test5 : NSObject<P3, P4>
62 @synthesize Prop=_XXX;
66 @property (copy) id Prop;
69 @protocol P6 <P3, P4, P5>
70 @property (copy) id Prop;
73 @interface Test6 : NSObject<P6> // Test for minimal listing of conforming protocols
74 @property (copy) id Prop;
80 @class UIDynamicAnimator, UIWindow;
81 @interface UIResponder : NSObject
84 @protocol EmptyProtocol
87 @protocol OptionalMethodsOnly
89 - (void)dynamicAnimatorWillResume:(UIDynamicAnimator*)animator;
90 - (void)dynamicAnimatorDidPause:(UIDynamicAnimator*)animator;
93 @protocol OptionalPropertiesOnly
95 @property (strong, nonatomic) id OptionalProperty;
98 @protocol OptionalEvrything
100 - (void)dynamicAnimatorWillResume:(UIDynamicAnimator*)animator;
101 @property (strong, nonatomic) id OptionalProperty;
102 - (void)dynamicAnimatorDidPause:(UIDynamicAnimator*)animator;
105 @protocol UIApplicationDelegate
108 @interface Test7 : UIResponder <UIApplicationDelegate>
109 @property (strong, nonatomic) UIWindow *window;
112 @implementation Test7
116 @interface BTLEBrowser
119 @protocol CBCentralManagerDelegate;
121 @protocol CBCentralManagerDelegate
122 - (id) Meth1: (double) arg;
125 @interface BTLEBrowser() <CBCentralManagerDelegate>
128 @implementation BTLEBrowser
129 - (id) Meth15515206: (double) arg { return 0; }