3 // RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng -target x86_64-apple-darwin10 %s > %t/out
4 // RUN: FileCheck %s < %t/out
6 // Ensure that XML we generate is not invalid.
7 // RUN: FileCheck %s -check-prefix=WRONG < %t/out
8 // WRONG-NOT: CommentXMLInvalid
14 int global_function();
15 // CHECK: <Declaration>int global_function()</Declaration>
20 extern void external_function(int x1
);
21 // CHECK: <Declaration>extern void external_function(int x1)</Declaration>
24 * \brief global variable;
27 // CHECK: <Declaration>int global_variable</Declaration>
30 * \brief local variable;
32 static int static_variable
;
33 // CHECK: <Declaration>static int static_variable</Declaration>
36 * \brief external variable
38 extern int external_variable
;
39 // CHECK: <Declaration>extern int external_variable</Declaration>
41 int global_function() {
43 * \brief a local variable
48 // CHECK: <Declaration>int global_function()</Declaration>
49 // CHECK: <Declaration>int local = 10</Declaration>
52 * \brief initialized decl.
54 int initialized_global
= 100;
55 // CHECK: <Declaration>int initialized_global = 100</Declaration>
58 * \brief typedef example
61 // CHECK: <Declaration>typedef int INT_T</Declaration>
64 * \brief aggregate type example
76 // CHECK: <Declaration>struct S {}</Declaration>
77 // CHECK: <Declaration>int iS1</Declaration>
78 // CHECK: <Declaration>double dS1</Declaration>
91 // CHECK: <Declaration>enum e {}</Declaration>
92 // CHECK: <Declaration>Two</Declaration>
95 *\brief block declaration
97 int (^Block
) (int i
, int j
);
98 // CHECK: <Declaration>int (^Block)(int, int)</Declaration>
101 *\brief block declaration
103 int (^Block1
) (int i
, int j
) = ^(int i
, int j
) { return i
+ j
; };
104 // CHECK: <Declaration>int (^Block1)(int, int) = ^(int i, int j) {\n}</Declaration>