1// Metadata section
2// CHECK: {"version":"{{[0-9]\.[0-9]\.[0-9]}}","type":"llvm.coverage.json.export","data":[
3
4// Open Export
5// CHECK-SAME: {"files":[
6
7// File Object
8// CHECK-SAME: {"filename":"{{[^"]+}}showExpansions.cpp",
9// CHECK-SAME: "segments":[
10// CHECK-SAME: {{(\[[0-9]+,[0-9]+,[0-9]+,[0-9]+,[0-9]+\],?)+}}],
11// CHECK-SAME: "expansions":[
12// CHECK-SAME: {"source_region":[24,5,24,17,100,0,1,1],
13// CHECK-SAME: "target_regions":[
14// CHECK-SAME: {{(\[[0-9]+,[0-9]+,[0-9]+,[0-9]+,[0-9]+,[0-9]+,[0-9]+,[0-9]+\],?)+}}
15// CHECK-SAME: ],
16
17// Yes, 4 of the same filename in a row
18// CHECK-SAME: "filenames":[
19// CHECK-SAME: "{{[^"]+}}showExpansions.cpp","{{[^"]+}}showExpansions.cpp",
20// CHECK-SAME: "{{[^"]+}}showExpansions.cpp","{{[^"]+}}showExpansions.cpp"]
21// CHECK-SAME: }],
22
23// Verify the Summary Section for the first file
24// CHECK-SAME: "summary":{
25// CHECK-SAME: "lines":{"count":5,"covered":5,"percent":100},
26// CHECK-SAME: "functions":{"count":1,"covered":1,"percent":100},
27// CHECK-SAME: "regions":{"count":13,"covered":12,"notcovered":1,"percent":92}}
28
29// Close Files Array
30// CHECK-SAME: ],
31
32// Functions List
33// CHECK-SAME: "functions":[
34// CHECK-SAME: {"name":"main","count":1,"regions":[
35// CHECK-SAME: {{(\[[0-9]+,[0-9]+,[0-9]+,[0-9]+,[0-9]+,[0-9]+,[0-9]+,[0-9]+\],?)+}}
36// CHECK-SAME: ],
37// CHECK-SAME: "filenames":[
38// CHECK-SAME: "{{[^"]+}}showExpansions.cpp",
39// CHECK-SAME: "{{[^"]+}}showExpansions.cpp",
40// CHECK-SAME: "{{[^"]+}}showExpansions.cpp",
41// CHECK-SAME: "{{[^"]+}}showExpansions.cpp"]
42// CHECK-SAME: }],
43
44// Full Export Summary
45// CHECK-SAME: "totals":{
46// CHECK-SAME: "lines":{"count":5,"covered":5,"percent":100},
47// CHECK-SAME: "functions":{"count":1,"covered":1,"percent":100},
48// CHECK-SAME: "instantiations":{"count":1,"covered":1,"percent":100},
49// CHECK-SAME: "regions":{"count":13,"covered":12,"notcovered":1,"percent":92}}
50
51// Close the export object, data array, and root object
52// CHECK-SAME: }]}
53