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
13 int global_function();
14 // CHECK: <Declaration>int global_function()</Declaration>
19 extern void external_function(int x1
);
20 // CHECK: <Declaration>extern void external_function(int x1)</Declaration>
23 * \brief global variable;
26 // CHECK: <Declaration>int global_variable</Declaration>
29 * \brief local variable;
31 static int static_variable
;
32 // CHECK: <Declaration>static int static_variable</Declaration>
35 * \brief external variable
37 extern int external_variable
;
38 // CHECK: <Declaration>extern int external_variable</Declaration>
40 int global_function() {
42 * \brief a local variable
47 // CHECK: <Declaration>int global_function()</Declaration>
48 // CHECK: <Declaration>int local = 10</Declaration>
51 * \brief initialized decl.
53 int initialized_global
= 100;
54 // CHECK: <Declaration>int initialized_global = 100</Declaration>
57 * \brief typedef example
60 // CHECK: <Declaration>typedef int INT_T</Declaration>
63 * \brief aggregate type example
75 // CHECK: <Declaration>struct S {}</Declaration>
76 // CHECK: <Declaration>int iS1</Declaration>
77 // CHECK: <Declaration>double dS1</Declaration>
90 // CHECK: <Declaration>enum e {}</Declaration>
91 // CHECK: <Declaration>Two</Declaration>
94 *\brief block declaration
96 int (^Block
) (int i
, int j
);
97 // CHECK: <Declaration>int (^Block)(int, int)</Declaration>
100 *\brief block declaration
102 int (^Block1
) (int i
, int j
) = ^(int i
, int j
) { return i
+ j
; };
103 // CHECK: <Declaration>int (^Block1)(int, int) = ^(int i, int j) {\n}</Declaration>