summaryrefslogtreecommitdiff
path: root/clang/test/Index/complete-at-directives.m
diff options
context:
space:
mode:
authorCarlo Zancanaro <carlo@pc-4w14-0.cs.usyd.edu.au>2012-10-15 17:10:06 +1100
committerCarlo Zancanaro <carlo@pc-4w14-0.cs.usyd.edu.au>2012-10-15 17:10:06 +1100
commitbe1de4be954c80875ad4108e0a33e8e131b2f2c0 (patch)
tree1fbbecf276bf7c7bdcbb4dd446099d6d90eaa516 /clang/test/Index/complete-at-directives.m
parentc4626a62754862d20b41e8a46a3574264ea80e6d (diff)
parentf1bd2e48c5324d3f7cda4090c87f8a5b6f463ce2 (diff)
Merge branch 'master' of ssh://bitbucket.org/czan/honours
Diffstat (limited to 'clang/test/Index/complete-at-directives.m')
-rw-r--r--clang/test/Index/complete-at-directives.m54
1 files changed, 54 insertions, 0 deletions
diff --git a/clang/test/Index/complete-at-directives.m b/clang/test/Index/complete-at-directives.m
new file mode 100644
index 0000000..1e97d45
--- /dev/null
+++ b/clang/test/Index/complete-at-directives.m
@@ -0,0 +1,54 @@
+/* Run lines are at the end, since line/column matter in this test. */
+@interface MyClass { @public }
+@end
+
+@implementation MyClass
+@end
+
+// RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:2:2 %s | FileCheck -check-prefix=CHECK-CC1 %s
+// CHECK-CC1: {TypedText class}{HorizontalSpace }{Placeholder name}
+// CHECK-CC1: {TypedText compatibility_alias}{HorizontalSpace }{Placeholder alias}{HorizontalSpace }{Placeholder class}
+// CHECK-CC1: {TypedText implementation}{HorizontalSpace }{Placeholder class}
+// CHECK-CC1: {TypedText interface}{HorizontalSpace }{Placeholder class}
+// CHECK-CC1: {TypedText protocol}{HorizontalSpace }{Placeholder protocol}
+
+// RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:3:2 %s | FileCheck -check-prefix=CHECK-CC2 %s
+// CHECK-CC2: {TypedText end}
+// CHECK-CC2: {TypedText optional}
+// CHECK-CC2: {TypedText property}
+// CHECK-CC2: {TypedText required}
+
+// RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:6:2 %s | FileCheck -check-prefix=CHECK-CC3 %s
+// CHECK-CC3: {TypedText dynamic}{HorizontalSpace }{Placeholder property}
+// CHECK-CC3: {TypedText end}
+// CHECK-CC3: {TypedText synthesize}{HorizontalSpace }{Placeholder property}
+
+// RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:2:1 %s | FileCheck -check-prefix=CHECK-CC4 %s
+// CHECK-CC4: NotImplemented:{TypedText @class}{HorizontalSpace }{Placeholder name}
+// CHECK-CC4: NotImplemented:{TypedText @compatibility_alias}{HorizontalSpace }{Placeholder alias}{HorizontalSpace }{Placeholder class}
+// CHECK-CC4: NotImplemented:{TypedText @implementation}{HorizontalSpace }{Placeholder class}
+// CHECK-CC4: NotImplemented:{TypedText @interface}{HorizontalSpace }{Placeholder class}
+// CHECK-CC4: NotImplemented:{TypedText @protocol}{HorizontalSpace }{Placeholder protocol}
+// CHECK-CC4: NotImplemented:{TypedText _Bool}
+// CHECK-CC4: TypedefDecl:{TypedText Class}
+// CHECK-CC4: TypedefDecl:{TypedText id}
+// CHECK-CC4: TypedefDecl:{TypedText SEL}
+
+// RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:3:1 %s | FileCheck -check-prefix=CHECK-CC5 %s
+// CHECK-CC5: {TypedText @end}
+// CHECK-CC5: {TypedText @optional}
+// CHECK-CC5: {TypedText @property}
+// CHECK-CC5: {TypedText @required}
+
+// RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:2:23 %s | FileCheck -check-prefix=CHECK-CC6 %s
+// CHECK-CC6: NotImplemented:{TypedText package}
+// CHECK-CC6: NotImplemented:{TypedText private}
+// CHECK-CC6: NotImplemented:{TypedText protected}
+// CHECK-CC6: NotImplemented:{TypedText public}
+
+// RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:2:22 %s | FileCheck -check-prefix=CHECK-CC7 %s
+// CHECK-CC7: NotImplemented:{TypedText @package}
+// CHECK-CC7: NotImplemented:{TypedText @private}
+// CHECK-CC7: NotImplemented:{TypedText @protected}
+// CHECK-CC7: NotImplemented:{TypedText @public}
+// CHECK-CC7: NotImplemented:{TypedText _Bool}