2 // RUN: split-file %s %t
3 // RUN: sed -e "s@INPUT_DIR@%{/t:regex_replacement}@g" \
4 // RUN: %t/reference.output.json.in >> %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:
22 /// Alpha channel for transparency
26 //--- reference.output.json.in
39 "architecture": "arm64",
54 "source": "c:@S@Color@FI@Red",
55 "target": "c:@S@Color",
56 "targetFallback": "Color"
60 "source": "c:@S@Color@FI@Green",
61 "target": "c:@S@Color",
62 "targetFallback": "Color"
66 "source": "c:@S@Color@FI@Blue",
67 "target": "c:@S@Color",
68 "targetFallback": "Color"
72 "source": "c:@S@Color@FI@Alpha",
73 "target": "c:@S@Color",
74 "targetFallback": "Color"
79 "accessLevel": "public",
80 "declarationFragments": [
111 "text": "Color in RGBA"
116 "interfaceLanguage": "c",
117 "precise": "c:@S@Color"
120 "displayName": "Structure",
121 "identifier": "c.struct"
128 "uri": "file://INPUT_DIR/input.h"
133 "kind": "identifier",
139 "kind": "identifier",
150 "accessLevel": "public",
151 "declarationFragments": [
153 "kind": "typeIdentifier",
154 "preciseIdentifier": "c:i",
155 "spelling": "unsigned int"
162 "kind": "identifier",
171 "interfaceLanguage": "c",
172 "precise": "c:@S@Color@FI@Red"
175 "displayName": "Instance Property",
176 "identifier": "c.property"
183 "uri": "file://INPUT_DIR/input.h"
188 "kind": "identifier",
194 "kind": "identifier",
206 "accessLevel": "public",
207 "declarationFragments": [
209 "kind": "typeIdentifier",
210 "preciseIdentifier": "c:i",
211 "spelling": "unsigned int"
218 "kind": "identifier",
227 "interfaceLanguage": "c",
228 "precise": "c:@S@Color@FI@Green"
231 "displayName": "Instance Property",
232 "identifier": "c.property"
239 "uri": "file://INPUT_DIR/input.h"
244 "kind": "identifier",
250 "kind": "identifier",
262 "accessLevel": "public",
263 "declarationFragments": [
265 "kind": "typeIdentifier",
266 "preciseIdentifier": "c:i",
267 "spelling": "unsigned int"
274 "kind": "identifier",
283 "interfaceLanguage": "c",
284 "precise": "c:@S@Color@FI@Blue"
287 "displayName": "Instance Property",
288 "identifier": "c.property"
295 "uri": "file://INPUT_DIR/input.h"
300 "kind": "identifier",
306 "kind": "identifier",
318 "accessLevel": "public",
319 "declarationFragments": [
321 "kind": "typeIdentifier",
322 "preciseIdentifier": "c:i",
323 "spelling": "unsigned int"
330 "kind": "identifier",
351 "text": "Alpha channel for transparency"
356 "interfaceLanguage": "c",
357 "precise": "c:@S@Color@FI@Alpha"
360 "displayName": "Instance Property",
361 "identifier": "c.property"
368 "uri": "file://INPUT_DIR/input.h"
373 "kind": "identifier",
379 "kind": "identifier",