diff options
Diffstat (limited to 'test/tools/llvm-cov')
-rw-r--r-- | test/tools/llvm-cov/Inputs/highlightedRanges.covmapping | bin | 355 -> 355 bytes | |||
-rw-r--r-- | test/tools/llvm-cov/Inputs/regionMarkers.covmapping | bin | 194 -> 202 bytes | |||
-rw-r--r-- | test/tools/llvm-cov/Inputs/report.covmapping | bin | 256 -> 219 bytes | |||
-rw-r--r-- | test/tools/llvm-cov/Inputs/showExpansions.covmapping | bin | 194 -> 250 bytes | |||
-rw-r--r-- | test/tools/llvm-cov/report.cpp | 20 | ||||
-rw-r--r-- | test/tools/llvm-cov/showHighlightedRanges.cpp | 12 | ||||
-rw-r--r-- | test/tools/llvm-cov/showLineExecutionCounts.cpp | 4 |
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 Binary files differindex 20eb0d7..e97320b 100644 --- a/test/tools/llvm-cov/Inputs/highlightedRanges.covmapping +++ b/test/tools/llvm-cov/Inputs/highlightedRanges.covmapping diff --git a/test/tools/llvm-cov/Inputs/regionMarkers.covmapping b/test/tools/llvm-cov/Inputs/regionMarkers.covmapping Binary files differindex 3ebcb07..501cba2 100644 --- a/test/tools/llvm-cov/Inputs/regionMarkers.covmapping +++ b/test/tools/llvm-cov/Inputs/regionMarkers.covmapping diff --git a/test/tools/llvm-cov/Inputs/report.covmapping b/test/tools/llvm-cov/Inputs/report.covmapping Binary files differindex 32d84bc..5d0bfc1 100644 --- a/test/tools/llvm-cov/Inputs/report.covmapping +++ b/test/tools/llvm-cov/Inputs/report.covmapping diff --git a/test/tools/llvm-cov/Inputs/showExpansions.covmapping b/test/tools/llvm-cov/Inputs/showExpansions.covmapping Binary files differindex b8c7d97..e02a728 100644 --- a/test/tools/llvm-cov/Inputs/showExpansions.covmapping +++ b/test/tools/llvm-cov/Inputs/showExpansions.covmapping 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 |