brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · 4b6f3b0 Raw
19 lines · plain
1// RUN: llvm-profdata merge %S/Inputs/mcdc-general.proftext -o %t.profdata2// RUN: llvm-cov export --format=text %S/Inputs/mcdc-general.o -instr-profile %t.profdata | FileCheck %s3 4// CHECK: 12,7,12,27,2,4,0,0,5,[true,true,true,true],[{"conditions":[false,null,false,null],"executed":true,"result":false},{"conditions":[false,null,true,false],"executed":true,"result":false},{"conditions":[true,false,false,null],"executed":true,"result":false},{"conditions":[true,false,true,false],"executed":true,"result":false},{"conditions":[true,false,true,true],"executed":true,"result":true},{"conditions":[true,true,null,null],"executed":true,"result":true}]5// CHECK: 15,7,15,13,1,2,0,0,5,[true,true],[{"conditions":[false,null],"executed":true,"result":false},{"conditions":[true,false],"executed":true,"result":false},{"conditions":[true,true],"executed":true,"result":true}]6// CHECK: 15,19,15,25,1,1,0,0,5,[true,false],[{"conditions":[false,null],"executed":true,"result":false},{"conditions":[true,true],"executed":true,"result":true}]7// CHECK: 18,7,19,15,1,3,0,0,5,[true,true,false,true],[{"conditions":[false,null,null,null],"executed":true,"result":false},{"conditions":[true,false,null,null],"executed":true,"result":false},{"conditions":[true,true,true,false],"executed":true,"result":false},{"conditions":[true,true,true,true],"executed":true,"result":true}]8// CHECK: "mcdc":{"count":12,"covered":10,"notcovered":2,"percent":83.333333333333343}9 10Instructions for regenerating the test:11 12# cd %S/Inputs13cp mcdc-general.cpp /tmp14 15clang -fcoverage-mcdc -fprofile-instr-generate -fcoverage-compilation-dir=. \16    -fcoverage-mapping /tmp/mcdc-general.cpp -o /tmp/mcdc-const.o17 18mv /tmp/mcdc-general.o %S/Inputs19