diff options
Diffstat (limited to 'test/Index/complete-objc-message.m')
-rw-r--r-- | test/Index/complete-objc-message.m | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/Index/complete-objc-message.m b/test/Index/complete-objc-message.m index 0ea33850560ec..955ab6f144f9f 100644 --- a/test/Index/complete-objc-message.m +++ b/test/Index/complete-objc-message.m @@ -181,16 +181,34 @@ void test_block_invoke(A *(^block1)(int), [block1(5) init]; } +@interface DO +- (void)method:(in bycopy A*)ain result:(out byref A**)aout; +@end + +void test_DO(DO *d, A* a) { + [d method:a aout:&a]; +} + // RUN: c-index-test -code-completion-at=%s:23:19 %s | FileCheck -check-prefix=CHECK-CC1 %s // CHECK-CC1: {TypedText categoryClassMethod} // CHECK-CC1: {TypedText classMethod1:}{Placeholder (id)}{HorizontalSpace }{TypedText withKeyword:}{Placeholder (int)} // CHECK-CC1: {TypedText classMethod2} // CHECK-CC1: {TypedText new} // CHECK-CC1: {TypedText protocolClassMethod} +// CHECK-CC1: Completion contexts: +// CHECK-CC1-NEXT: Objective-C class method +// CHECK-CC1-NEXT: Container Kind: ObjCInterfaceDecl +// CHECK-CC1-NEXT: Container is complete +// CHECK-CC1-NEXT: Container USR: c:objc(cs)Foo // RUN: c-index-test -code-completion-at=%s:24:8 %s | FileCheck -check-prefix=CHECK-CC2 %s // CHECK-CC2: {TypedText categoryInstanceMethod} // CHECK-CC2: {TypedText instanceMethod1} // CHECK-CC2: {TypedText protocolInstanceMethod:}{Placeholder (int)} +// CHECK-CC2: Completion contexts: +// CHECK-CC2-NEXT: Objective-C instance method +// CHECK-CC2-NEXT: Container Kind: ObjCInterfaceDecl +// CHECK-CC2-NEXT: Container is complete +// CHECK-CC2-NEXT: Container USR: c:objc(cs)Foo // RUN: c-index-test -code-completion-at=%s:61:16 %s | FileCheck -check-prefix=CHECK-CC3 %s // CHECK-CC3: ObjCClassMethodDecl:{ResultType int}{TypedText MyClassMethod:}{Placeholder (id)} // CHECK-CC3: ObjCClassMethodDecl:{ResultType int}{TypedText MyPrivateMethod} @@ -218,6 +236,7 @@ void test_block_invoke(A *(^block1)(int), // RUN: c-index-test -code-completion-at=%s:95:24 %s | FileCheck -check-prefix=CHECK-CC9 %s // CHECK-CC9: ObjCInstanceMethodDecl:{ResultType int}{Informative Method:}{Informative Arg1:}{TypedText Arg2:}{Placeholder (int)} // CHECK-CC9: ObjCInstanceMethodDecl:{ResultType int}{Informative Method:}{Informative Arg1:}{TypedText OtherArg:}{Placeholder (id)} +// CHECK-CC9: Objective-C selector: Method:Arg1: // RUN: c-index-test -code-completion-at=%s:61:11 %s | FileCheck -check-prefix=CHECK-CCA %s // CHECK-CCA: TypedefDecl:{TypedText Class} // CHECK-CCA-NEXT: ObjCInterfaceDecl:{TypedText Foo} @@ -243,6 +262,7 @@ void test_block_invoke(A *(^block1)(int), // CHECK-CCD: ObjCClassMethodDecl:{ResultType int}{Informative Method:}{TypedText Arg1:}{Placeholder (int)}{HorizontalSpace }{TypedText OtherArg:}{Placeholder (id)} // CHECK-CCD: ObjCClassMethodDecl:{ResultType int}{Informative Method:}{TypedText SomeArg:}{Placeholder (int)}{HorizontalSpace }{TypedText OtherArg:}{Placeholder (id)} // CHECK-CCD-NOT: ObjCClassMethodDecl:{ResultType int}{Informative Method:}{TypedText } +// CHECK-CCD: Objective-C selector: Method: // RUN: c-index-test -code-completion-at=%s:116:30 %s | FileCheck -check-prefix=CHECK-CCE %s // CHECK-CCE: ObjCClassMethodDecl:{ResultType int}{Informative Method:}{Informative Arg1:}{TypedText Arg2:}{Placeholder (int)} // CHECK-CCE: ObjCClassMethodDecl:{ResultType int}{Informative Method:}{Informative Arg1:}{TypedText OtherArg:}{Placeholder (id)} @@ -311,3 +331,6 @@ void test_block_invoke(A *(^block1)(int), // RUN: c-index-test -code-completion-at=%s:141:30 %s | FileCheck -check-prefix=CHECK-CCE %s // RUN: c-index-test -code-completion-at=%s:175:12 %s | FileCheck -check-prefix=CHECK-CLASS-RESULT %s + +// RUN: c-index-test -code-completion-at=%s:189:6 %s | FileCheck -check-prefix=CHECK-DISTRIB-OBJECTS %s +// CHECK-DISTRIB-OBJECTS: ObjCInstanceMethodDecl:{ResultType void}{TypedText method:}{Placeholder (in bycopyA *)}{HorizontalSpace }{TypedText result:}{Placeholder (out byrefA **)} (35) |