2 // RUN: split-file %s %t
3 // RUN: sed -e "s@INPUT_DIR@%/t@g" %t/reference.output.json.in >> \
4 // RUN: %t/reference.output.json
5 // RUN: %clang -extract-api -target arm64-apple-macosx \
6 // RUN: %t/input.h -o %t/output.json | FileCheck -allow-empty %s
8 // Generator version is not consistent across test runs, normalize it.
9 // RUN: sed -e "s@\"generator\": \".*\"@\"generator\": \"?\"@g" \
10 // RUN: %t/output.json >> %t/output-normalized.json
11 // RUN: diff %t/reference.output.json %t/output-normalized.json
14 // CHECK-NOT: warning:
21 Train
, ///< Move this to the top! -Sheldon
26 enum Direction
: unsigned char {
33 //--- reference.output.json.in
46 "architecture": "arm64",
61 "source": "c:@E@Vehicle@Bicycle",
62 "target": "c:@E@Vehicle"
66 "source": "c:@E@Vehicle@Car",
67 "target": "c:@E@Vehicle"
71 "source": "c:@E@Vehicle@Train",
72 "target": "c:@E@Vehicle"
76 "source": "c:@E@Vehicle@Ship",
77 "target": "c:@E@Vehicle"
81 "source": "c:@E@Vehicle@Airplane",
82 "target": "c:@E@Vehicle"
86 "source": "c:@E@Direction@North",
87 "target": "c:@E@Direction"
91 "source": "c:@E@Direction@East",
92 "target": "c:@E@Direction"
96 "source": "c:@E@Direction@South",
97 "target": "c:@E@Direction"
101 "source": "c:@E@Direction@West",
102 "target": "c:@E@Direction"
107 "declarationFragments": [
117 "kind": "identifier",
118 "spelling": "Vehicle"
125 "kind": "typeIdentifier",
126 "preciseIdentifier": "c:i",
127 "spelling": "unsigned int"
143 "text": "Kinds of vehicles"
148 "interfaceLanguage": "c",
149 "precise": "c:@E@Vehicle"
152 "displayName": "Enumeration",
153 "identifier": "c.enum"
158 "uri": "file://INPUT_DIR/input.h"
163 "kind": "identifier",
164 "spelling": "Vehicle"
171 "declarationFragments": [
173 "kind": "identifier",
174 "spelling": "Bicycle"
178 "interfaceLanguage": "c",
179 "precise": "c:@E@Vehicle@Bicycle"
182 "displayName": "Enumeration Case",
183 "identifier": "c.enum.case"
188 "uri": "file://INPUT_DIR/input.h"
193 "kind": "identifier",
194 "spelling": "Bicycle"
201 "declarationFragments": [
203 "kind": "identifier",
208 "interfaceLanguage": "c",
209 "precise": "c:@E@Vehicle@Car"
212 "displayName": "Enumeration Case",
213 "identifier": "c.enum.case"
218 "uri": "file://INPUT_DIR/input.h"
223 "kind": "identifier",
231 "declarationFragments": [
233 "kind": "identifier",
250 "text": "Move this to the top! -Sheldon"
255 "interfaceLanguage": "c",
256 "precise": "c:@E@Vehicle@Train"
259 "displayName": "Enumeration Case",
260 "identifier": "c.enum.case"
265 "uri": "file://INPUT_DIR/input.h"
270 "kind": "identifier",
278 "declarationFragments": [
280 "kind": "identifier",
285 "interfaceLanguage": "c",
286 "precise": "c:@E@Vehicle@Ship"
289 "displayName": "Enumeration Case",
290 "identifier": "c.enum.case"
295 "uri": "file://INPUT_DIR/input.h"
300 "kind": "identifier",
308 "declarationFragments": [
310 "kind": "identifier",
311 "spelling": "Airplane"
315 "interfaceLanguage": "c",
316 "precise": "c:@E@Vehicle@Airplane"
319 "displayName": "Enumeration Case",
320 "identifier": "c.enum.case"
325 "uri": "file://INPUT_DIR/input.h"
330 "kind": "identifier",
331 "spelling": "Airplane"
338 "declarationFragments": [
348 "kind": "identifier",
349 "spelling": "Direction"
356 "kind": "typeIdentifier",
357 "preciseIdentifier": "c:c",
358 "spelling": "unsigned char"
362 "interfaceLanguage": "c",
363 "precise": "c:@E@Direction"
366 "displayName": "Enumeration",
367 "identifier": "c.enum"
372 "uri": "file://INPUT_DIR/input.h"
377 "kind": "identifier",
378 "spelling": "Direction"
385 "declarationFragments": [
387 "kind": "identifier",
392 "interfaceLanguage": "c",
393 "precise": "c:@E@Direction@North"
396 "displayName": "Enumeration Case",
397 "identifier": "c.enum.case"
402 "uri": "file://INPUT_DIR/input.h"
407 "kind": "identifier",
415 "declarationFragments": [
417 "kind": "identifier",
422 "interfaceLanguage": "c",
423 "precise": "c:@E@Direction@East"
426 "displayName": "Enumeration Case",
427 "identifier": "c.enum.case"
432 "uri": "file://INPUT_DIR/input.h"
437 "kind": "identifier",
445 "declarationFragments": [
447 "kind": "identifier",
452 "interfaceLanguage": "c",
453 "precise": "c:@E@Direction@South"
456 "displayName": "Enumeration Case",
457 "identifier": "c.enum.case"
462 "uri": "file://INPUT_DIR/input.h"
467 "kind": "identifier",
475 "declarationFragments": [
477 "kind": "identifier",
482 "interfaceLanguage": "c",
483 "precise": "c:@E@Direction@West"
486 "displayName": "Enumeration Case",
487 "identifier": "c.enum.case"
492 "uri": "file://INPUT_DIR/input.h"
497 "kind": "identifier",