[cfe-commits] r98056 - /cfe/trunk/test/Index/annotate-tokens.m
Douglas Gregor
dgregor at apple.com
Tue Mar 9 05:06:04 PST 2010
Author: dgregor
Date: Tue Mar 9 07:06:04 2010
New Revision: 98056
URL: http://llvm.org/viewvc/llvm-project?rev=98056&view=rev
Log:
Add an Objective-C test for token annotation
Added:
cfe/trunk/test/Index/annotate-tokens.m
Added: cfe/trunk/test/Index/annotate-tokens.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/annotate-tokens.m?rev=98056&view=auto
==============================================================================
--- cfe/trunk/test/Index/annotate-tokens.m (added)
+++ cfe/trunk/test/Index/annotate-tokens.m Tue Mar 9 07:06:04 2010
@@ -0,0 +1,22 @@
+ at interface Foo
+- (int)compare:(Foo*)other;
+ at end
+
+// RUN: c-index-test -test-annotate-tokens=%s:1:1:3:5 %s | FileCheck %s
+// CHECK: Punctuation: "@" [1:1 - 1:2]
+// CHECK: Identifier: "interface" [1:2 - 1:11]
+// CHECK: Identifier: "Foo" [1:12 - 1:15] ObjCInterfaceDecl=Foo:1:12
+// CHECK: Punctuation: "-" [2:1 - 2:2] ObjCInstanceMethodDecl=compare::2:1
+// CHECK: Punctuation: "(" [2:3 - 2:4]
+// CHECK: Keyword: "int" [2:4 - 2:7]
+// CHECK: Punctuation: ")" [2:7 - 2:8]
+// CHECK: Identifier: "compare" [2:8 - 2:15]
+// CHECK: Punctuation: ":" [2:15 - 2:16]
+// CHECK: Punctuation: "(" [2:16 - 2:17]
+// CHECK: Identifier: "Foo" [2:17 - 2:20] ObjCClassRef=Foo:1:12
+// CHECK: Punctuation: "*" [2:20 - 2:21]
+// CHECK: Punctuation: ")" [2:21 - 2:22]
+// CHECK: Identifier: "other" [2:22 - 2:27] ParmDecl=other:2:22 (Definition)
+// CHECK: Punctuation: ";" [2:27 - 2:28]
+// CHECK: Punctuation: "@" [3:1 - 3:2]
+// CHECK: Identifier: "end" [3:2 - 3:5]
More information about the cfe-commits
mailing list