summaryrefslogtreecommitdiff
path: root/clang/test/Index/complete-at-directives.m
diff options
context:
space:
mode:
authorZancanaro; Carlo <czan8762@plang3.cs.usyd.edu.au>2012-09-24 09:58:17 +1000
committerZancanaro; Carlo <czan8762@plang3.cs.usyd.edu.au>2012-09-24 09:58:17 +1000
commit222e2a7620e6520ffaf4fc4e69d79c18da31542e (patch)
tree7bfbc05bfa3b41c8f9d2e56d53a0bc3e310df239 /clang/test/Index/complete-at-directives.m
parent3d206f03985b50beacae843d880bccdc91a9f424 (diff)
Add the clang library to the repo (with some of my changes, too).
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}