aboutsummaryrefslogtreecommitdiffstats
path: root/test/tools/llvm-cov
diff options
context:
space:
mode:
Diffstat (limited to 'test/tools/llvm-cov')
-rw-r--r--test/tools/llvm-cov/Inputs/highlightedRanges.covmappingbin355 -> 355 bytes
-rw-r--r--test/tools/llvm-cov/Inputs/regionMarkers.covmappingbin194 -> 202 bytes
-rw-r--r--test/tools/llvm-cov/Inputs/report.covmappingbin256 -> 219 bytes
-rw-r--r--test/tools/llvm-cov/Inputs/showExpansions.covmappingbin194 -> 250 bytes
-rw-r--r--test/tools/llvm-cov/report.cpp20
-rw-r--r--test/tools/llvm-cov/showHighlightedRanges.cpp12
-rw-r--r--test/tools/llvm-cov/showLineExecutionCounts.cpp4
7 files changed, 25 insertions, 11 deletions
diff --git a/test/tools/llvm-cov/Inputs/highlightedRanges.covmapping b/test/tools/llvm-cov/Inputs/highlightedRanges.covmapping
index 20eb0d7..e97320b 100644
--- a/test/tools/llvm-cov/Inputs/highlightedRanges.covmapping
+++ b/test/tools/llvm-cov/Inputs/highlightedRanges.covmapping
Binary files differ
diff --git a/test/tools/llvm-cov/Inputs/regionMarkers.covmapping b/test/tools/llvm-cov/Inputs/regionMarkers.covmapping
index 3ebcb07..501cba2 100644
--- a/test/tools/llvm-cov/Inputs/regionMarkers.covmapping
+++ b/test/tools/llvm-cov/Inputs/regionMarkers.covmapping
Binary files differ
diff --git a/test/tools/llvm-cov/Inputs/report.covmapping b/test/tools/llvm-cov/Inputs/report.covmapping
index 32d84bc..5d0bfc1 100644
--- a/test/tools/llvm-cov/Inputs/report.covmapping
+++ b/test/tools/llvm-cov/Inputs/report.covmapping
Binary files differ
diff --git a/test/tools/llvm-cov/Inputs/showExpansions.covmapping b/test/tools/llvm-cov/Inputs/showExpansions.covmapping
index b8c7d97..e02a728 100644
--- a/test/tools/llvm-cov/Inputs/showExpansions.covmapping
+++ b/test/tools/llvm-cov/Inputs/showExpansions.covmapping
Binary files differ
diff --git a/test/tools/llvm-cov/report.cpp b/test/tools/llvm-cov/report.cpp
index 297322a..570012e 100644
--- a/test/tools/llvm-cov/report.cpp
+++ b/test/tools/llvm-cov/report.cpp
@@ -1,7 +1,21 @@
-// RUN: llvm-cov report %S/Inputs/report.covmapping -instr-profile %S/Inputs/report.profdata -no-colors 2>&1 | FileCheck %s
+// RUN: llvm-cov report %S/Inputs/report.covmapping -instr-profile %S/Inputs/report.profdata -no-colors -filename-equivalence 2>&1 | FileCheck %s
+// RUN: llvm-cov report %S/Inputs/report.covmapping -instr-profile %S/Inputs/report.profdata -no-colors -filename-equivalence report.cpp 2>&1 | FileCheck -check-prefix=FILT-NEXT %s
-// CHECK: Filename Regions Miss Cover Functions Executed
-// CHECK: TOTAL 5 2 60.00% 4 75.00%
+// CHECK: Filename Regions Miss Cover Functions Executed
+// CHECK-NEXT: ---
+// CHECK-NEXT: report.cpp 5 2 60.00% 4 75.00%
+// CHECK-NEXT: ---
+// CHECK-NEXT: TOTAL 5 2 60.00% 4 75.00%
+
+// FILT: File 'report.cpp':
+// FILT-NEXT: Name Regions Miss Cover Lines Miss Cover
+// FILT-NEXT: ---
+// FILT-NEXT: _Z3foob 2 1 50.00% 4 2 50.00%
+// FILT-NEXT: _Z3barv 1 0 100.00% 2 0 100.00%
+// FILT-NEXT: _Z4funcv 1 1 0.00% 2 2 0.00%
+// FILT-NEXT: main 1 0 100.00% 5 0 100.00%
+// FILT-NEXT: ---
+// FILT-NEXT: TOTAL 5 2 60.00% 13 4 69.23%
void foo(bool cond) {
if (cond) {
diff --git a/test/tools/llvm-cov/showHighlightedRanges.cpp b/test/tools/llvm-cov/showHighlightedRanges.cpp
index cec7308..1ff7929 100644
--- a/test/tools/llvm-cov/showHighlightedRanges.cpp
+++ b/test/tools/llvm-cov/showHighlightedRanges.cpp
@@ -2,17 +2,17 @@
void func() {
return;
- int i = 0; // CHECK: Highlighted line [[@LINE]], 3 -> 12
-}
+ int i = 0; // CHECK: Highlighted line [[@LINE]], 3 -> ?
+} // CHECK: Highlighted line [[@LINE]], 1 -> 2
void func2(int x) {
if(x > 5) {
while(x >= 9) {
return;
- --x; // CHECK: Highlighted line [[@LINE]], 7 -> 10
- }
- int i = 0; // CHECK: Highlighted line [[@LINE]], 5 -> 14
- }
+ --x; // CHECK: Highlighted line [[@LINE]], 7 -> ?
+ } // CHECK: Highlighted line [[@LINE]], 1 -> 6
+ int i = 0; // CHECK: Highlighted line [[@LINE]], 5 -> ?
+ } // CHECK: Highlighted line [[@LINE]], 1 -> 4
}
void test() {
diff --git a/test/tools/llvm-cov/showLineExecutionCounts.cpp b/test/tools/llvm-cov/showLineExecutionCounts.cpp
index 34baa57..625c3f2 100644
--- a/test/tools/llvm-cov/showLineExecutionCounts.cpp
+++ b/test/tools/llvm-cov/showLineExecutionCounts.cpp
@@ -12,11 +12,11 @@ int main() { // CHECK: 1| [[@LINE]]|int main(
x = 1; // CHECK: 1| [[@LINE]]| x = 1
} // CHECK: 1| [[@LINE]]| }
// CHECK: 1| [[@LINE]]|
- for (int i = 0; i < 100; ++i) { // CHECK: 100| [[@LINE]]| for (
+ for (int i = 0; i < 100; ++i) { // CHECK: 101| [[@LINE]]| for (
x = 1; // CHECK: 100| [[@LINE]]| x = 1
} // CHECK: 100| [[@LINE]]| }
// CHECK: 1| [[@LINE]]|
- x = x < 10 ? x + 1 : x - 1; // CHECK: 0| [[@LINE]]| x =
+ x = x < 10 ? x + 1 : x - 1; // CHECK: 1| [[@LINE]]| x =
x = x > 10 ? // CHECK: 1| [[@LINE]]| x =
x - 1: // CHECK: 0| [[@LINE]]| x
x + 1; // CHECK: 1| [[@LINE]]| x