aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/tools/llvm-cov/branch-c-general.test
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/tools/llvm-cov/branch-c-general.test')
-rw-r--r--llvm/test/tools/llvm-cov/branch-c-general.test78
1 files changed, 39 insertions, 39 deletions
diff --git a/llvm/test/tools/llvm-cov/branch-c-general.test b/llvm/test/tools/llvm-cov/branch-c-general.test
index 8c58c15..dd9c92e 100644
--- a/llvm/test/tools/llvm-cov/branch-c-general.test
+++ b/llvm/test/tools/llvm-cov/branch-c-general.test
@@ -2,8 +2,8 @@
// RUN: yaml2obj %S/Inputs/branch-c-general.yaml -o %t.o
// RUN: llvm-profdata merge %S/Inputs/branch-c-general.proftext -o %t.profdata
-// RUN: llvm-cov show --show-branches=count %t.o -instr-profile %t.profdata -path-equivalence=/tmp,%S/Inputs %S/Inputs/branch-c-general.c | FileCheck %s
-// RUN: llvm-cov report --show-branch-summary %t.o -instr-profile %t.profdata -show-functions -path-equivalence=/tmp,%S/Inputs %S/Inputs/branch-c-general.c | FileCheck %s -check-prefix=REPORT
+// RUN: llvm-cov show --show-branches=count %t.o -instr-profile %t.profdata -path-equivalence=.,%S/Inputs %S/Inputs/branch-c-general.c | FileCheck %s
+// RUN: llvm-cov report --show-branch-summary %t.o -instr-profile %t.profdata -show-functions -path-equivalence=.,%S/Inputs %S/Inputs/branch-c-general.c | FileCheck %s -check-prefix=REPORT
// CHECK: simple_loops()
// CHECK: Branch (9:15): [True: 100, False: 1]
@@ -17,9 +17,9 @@
// CHECK: Branch (21:16): [True: 33, False: 17]
// CHECK: Branch (22:11): [True: 33, False: 0]
// CHECK: Branch (24:11): [True: 16, False: 1]
-// CHECK: Branch (27:9): [Folded - Ignored]
+// CHECK: Branch (27:9): [True: 100, Folded]
// CHECK: Branch (27:14): [True: 99, False: 1]
-// CHECK: Branch (28:9): [Folded - Ignored]
+// CHECK: Branch (28:9): [Folded, False: 100]
// CHECK: Branch (28:14): [True: 99, False: 1]
// CHECK: early_exits()
@@ -40,9 +40,9 @@
// CHECK: Branch (75:9): [True: 0, False: 1]
// CHECK: Branch (83:7): [True: 2, False: 1]
// CHECK: Branch (86:10): [True: 0, False: 1]
-// CHECK: Branch (89:5): [True: 1, False: 2]
-// CHECK: Branch (91:5): [True: 1, False: 2]
-// CHECK: Branch (93:5): [True: 1, False: 2]
+// CHECK: Branch (89:5): [True: 1, Folded]
+// CHECK: Branch (91:5): [True: 1, Folded]
+// CHECK: Branch (93:5): [True: 1, Folded]
// CHECK: Branch (98:15): [True: 10, False: 1]
// CHECK: Branch (101:9): [True: 0, False: 0]
// CHECK: Branch (103:9): [True: 9, False: 1]
@@ -50,34 +50,34 @@
// CHECK: switches()
// CHECK: Branch (113:3): [True: 1, Folded]
// CHECK: Branch (117:63): [True: 15, False: 0]
-// CHECK: Branch (119:5): [True: 1, False: 14]
+// CHECK: Branch (119:5): [True: 1, Folded]
// CHECK: Branch (120:11): [True: 0, False: 1]
-// CHECK: Branch (122:5): [True: 2, False: 13]
+// CHECK: Branch (122:5): [True: 2, Folded]
// CHECK: Branch (123:11): [True: 2, False: 1]
-// CHECK: Branch (125:5): [True: 3, False: 12]
+// CHECK: Branch (125:5): [True: 3, Folded]
// CHECK: Branch (126:11): [True: 3, False: 0]
-// CHECK: Branch (128:5): [True: 4, False: 11]
+// CHECK: Branch (128:5): [True: 4, Folded]
// CHECK: Branch (129:11): [True: 4, False: 0]
// CHECK: Branch (131:7): [True: 4, Folded]
// CHECK: Branch (132:13): [True: 4, False: 0]
-// CHECK: Branch (136:5): [True: 5, False: 10]
+// CHECK: Branch (136:5): [True: 5, Folded]
// CHECK: Branch (137:11): [True: 1, False: 4]
// CHECK: Branch (143:7): [True: 0, False: 0]
// CHECK: big_switch()
// CHECK: Branch (148:19): [True: 32, False: 1]
-// CHECK: Branch (150:5): [True: 1, False: 31]
+// CHECK: Branch (150:5): [True: 1, Folded]
// CHECK: Branch (151:11): [True: 0, False: 1]
-// CHECK: Branch (153:5): [True: 1, False: 31]
+// CHECK: Branch (153:5): [True: 1, Folded]
// CHECK: Branch (154:11): [True: 1, False: 1]
-// CHECK: Branch (156:5): [True: 11, False: 21]
+// CHECK: Branch (156:5): [True: 11, Folded]
// CHECK: Branch (157:11): [True: 11, False: 0]
-// CHECK: Branch (161:5): [True: 1, False: 31]
+// CHECK: Branch (161:5): [True: 1, Folded]
// CHECK: Branch (162:11): [True: 1, False: 0]
-// CHECK: Branch (164:5): [True: 15, False: 17]
+// CHECK: Branch (164:5): [True: 15, Folded]
// CHECK: Branch (165:11): [True: 15, False: 0]
// CHECK: Branch (170:11): [True: 1, False: 0]
-// CHECK: Branch (172:5): [True: 2, False: 30]
+// CHECK: Branch (172:5): [True: 2, Folded]
// CHECK: Branch (173:11): [True: 2, False: 0]
// CHECK: boolean_operators()
@@ -117,34 +117,34 @@
// REPORT: Name Regions Miss Cover Lines Miss Cover Branches Miss Cover
// REPORT-NEXT: ---
-// REPORT-NEXT: simple_loops 8 0 100.00% 9 0 100.00% 6 0 100.00%
-// REPORT-NEXT: conditionals 24 0 100.00% 15 0 100.00% 16 2 87.50%
-// REPORT-NEXT: early_exits 20 4 80.00% 25 2 92.00% 16 6 62.50%
-// REPORT-NEXT: jumps 39 12 69.23% 48 2 95.83% 26 9 65.38%
-// REPORT-NEXT: switches 28 5 82.14% 38 4 89.47% 28 7 75.00%
-// REPORT-NEXT: big_switch 25 1 96.00% 32 0 100.00% 30 6 80.00%
-// REPORT-NEXT: boolean_operators 16 0 100.00% 13 0 100.00% 22 2 90.91%
-// REPORT-NEXT: boolop_loops 19 0 100.00% 14 0 100.00% 16 2 87.50%
-// REPORT-NEXT: conditional_operator 4 2 50.00% 8 0 100.00% 4 2 50.00%
-// REPORT-NEXT: do_fallthrough 9 0 100.00% 12 0 100.00% 6 0 100.00%
+// REPORT-NEXT: simple_loops 8 0 100.00% 8 0 100.00% 6 0 100.00%
+// REPORT-NEXT: conditionals 24 0 100.00% 13 0 100.00% 18 2 88.89%
+// REPORT-NEXT: early_exits 20 4 80.00% 19 2 89.47% 16 6 62.50%
+// REPORT-NEXT: jumps 39 12 69.23% 38 3 92.11% 24 10 58.33%
+// REPORT-NEXT: switches 27 4 85.19% 30 2 93.33% 24 8 66.67%
+// REPORT-NEXT: big_switch 25 1 96.00% 26 0 100.00% 23 6 73.91%
+// REPORT-NEXT: boolean_operators 16 0 100.00% 9 0 100.00% 22 2 90.91%
+// REPORT-NEXT: boolop_loops 19 0 100.00% 9 0 100.00% 16 2 87.50%
+// REPORT-NEXT: conditional_operator 6 2 66.67% 5 0 100.00% 4 2 50.00%
+// REPORT-NEXT: do_fallthrough 9 0 100.00% 9 0 100.00% 6 0 100.00%
// REPORT-NEXT: main 1 0 100.00% 16 0 100.00% 0 0 0.00%
-// REPORT-NEXT: c-general.c:static_func 4 0 100.00% 4 0 100.00% 2 0 100.00%
+// REPORT-NEXT: static_func 4 0 100.00% 4 0 100.00% 2 0 100.00%
// REPORT-NEXT: ---
-// REPORT-NEXT: TOTAL 197 24 87.82% 234 8 96.58% 172 36 79.07%
+// REPORT-NEXT: TOTAL 198 23 88.38% 186 7 96.24% 161 38 76.40%
// Test file-level report.
// RUN: llvm-profdata merge %S/Inputs/branch-c-general.proftext -o %t.profdata
-// RUN: llvm-cov report %t.o -instr-profile %t.profdata -path-equivalence=/tmp,%S/Inputs %S/Inputs/branch-c-general.c | FileCheck %s -check-prefix=FILEREPORT
-// FILEREPORT: TOTAL{{.*}}172 36 79.07%
+// RUN: llvm-cov report %t.o -instr-profile %t.profdata -path-equivalence=.,%S/Inputs %S/Inputs/branch-c-general.c | FileCheck %s -check-prefix=FILEREPORT
+// FILEREPORT: TOTAL{{.*}}161 38 76.40%
// Test color True/False output.
-// RUN: llvm-cov show --use-color --show-branches=count %t.o -instr-profile %t.profdata -path-equivalence=/tmp,%S/Inputs %S/Inputs/branch-c-general.c | FileCheck %s -check-prefix=USECOLOR
+// RUN: llvm-cov show --use-color --show-branches=count %t.o -instr-profile %t.profdata -path-equivalence=.,%S/Inputs %S/Inputs/branch-c-general.c | FileCheck %s -check-prefix=USECOLOR
// USECOLOR: Branch ({{[0-9]+}}:7): {{.*}}: 0, {{.*}}0]
// Test html output.
-// RUN: llvm-cov show --show-branch-summary --show-branches=count %t.o -instr-profile %t.profdata -path-equivalence=/tmp,%S/Inputs %S/Inputs/branch-c-general.c -format html -o %t.html.dir
-// RUN: FileCheck -check-prefix=HTML -input-file=%t.html.dir/coverage/tmp/branch-c-general.c.html %s
-// HTML-COUNT-89: Branch (<span class='line-number'><a name='L{{[0-9]+}}' href='#L{{[0-9]+}}'><span>
+// RUN: llvm-cov show --show-branch-summary --show-branches=count %t.o -instr-profile %t.profdata -path-equivalence=.,%S/Inputs %S/Inputs/branch-c-general.c -format html -o %t.html.dir
+// RUN: FileCheck -check-prefix=HTML -input-file=%t.html.dir/coverage/branch-c-general.c.html %s
+// HTML-COUNT-91: Branch (<span class='line-number'><a name='L{{[0-9]+}}' href='#L{{[0-9]+}}'><span>
// HTML-NOT: Branch (<span class='line-number'><a name='L{{[0-9]+}}' href='#L{{[0-9]+}}'><span>
// RUN: FileCheck -check-prefix HTML-INDEX -input-file %t.html.dir/index.html %s
@@ -158,10 +158,10 @@
// HTML-INDEX: <td class='column-entry-green'>
// HTML-INDEX: 100.00% (12/12)
// HTML-INDEX: <td class='column-entry-yellow'>
-// HTML-INDEX: 96.58% (226/234)
+// HTML-INDEX: 96.24% (179/186)
// HTML-INDEX: <td class='column-entry-yellow'>
-// HTML-INDEX: 87.82% (173/197)
+// HTML-INDEX: 88.38% (175/198)
// HTML-INDEX: <td class='column-entry-red'>
-// HTML-INDEX: 79.07% (136/172)
+// HTML-INDEX: 76.40% (123/161)
// HTML-INDEX: <tr class='light-row-bold'>
// HTML-INDEX: Totals