diff options
author | Vedant Kumar <vsk@apple.com> | 2017-09-19 02:00:12 +0000 |
---|---|---|
committer | Vedant Kumar <vsk@apple.com> | 2017-09-19 02:00:12 +0000 |
commit | b7fdaf2cd403e99f3079efafc1793e3e7868a245 (patch) | |
tree | 3c7d9aba6a9b0731755dd7da5e049d60cef46e14 /llvm/test | |
parent | ef8e05ff07e3ff6b7d9aedb615b12a2ed61b9d01 (diff) | |
download | bcm5719-llvm-b7fdaf2cd403e99f3079efafc1793e3e7868a245.tar.gz bcm5719-llvm-b7fdaf2cd403e99f3079efafc1793e3e7868a245.zip |
[llvm-cov] Make report metrics agree with line exec counts, fixes PR34615
Use the same logic as the line-oriented coverage view to determine the
number of covered lines in a function.
Fixes llvm.org/PR34615.
llvm-svn: 313604
Diffstat (limited to 'llvm/test')
5 files changed, 9 insertions, 9 deletions
diff --git a/llvm/test/tools/llvm-cov/Inputs/highlightedRanges.json b/llvm/test/tools/llvm-cov/Inputs/highlightedRanges.json index 3713a4ea7c4..2948e86e453 100644 --- a/llvm/test/tools/llvm-cov/Inputs/highlightedRanges.json +++ b/llvm/test/tools/llvm-cov/Inputs/highlightedRanges.json @@ -12,7 +12,7 @@ // Verify the Summary Section for the first file // CHECK-SAME: "summary":{ -// CHECK-SAME: "lines":{"count":40,"covered":26,"percent":65}, +// CHECK-SAME: "lines":{"count":40,"covered":27,"percent":67}, // CHECK-SAME: "functions":{"count":4,"covered":4,"percent":100}, // CHECK-SAME: "regions":{"count":19,"covered":11,"notcovered":8,"percent":57}}} @@ -45,7 +45,7 @@ // Full Export Summary // CHECK-SAME: "totals":{ -// CHECK-SAME: "lines":{"count":40,"covered":26,"percent":65}, +// CHECK-SAME: "lines":{"count":40,"covered":27,"percent":67}, // CHECK-SAME: "functions":{"count":4,"covered":4,"percent":100}, // CHECK-SAME: "instantiations":{"count":4,"covered":4,"percent":100}, // CHECK-SAME: "regions":{"count":19,"covered":11,"notcovered":8,"percent":57}} diff --git a/llvm/test/tools/llvm-cov/Inputs/lineExecutionCounts.json b/llvm/test/tools/llvm-cov/Inputs/lineExecutionCounts.json index aaf1d9aa4e1..07f39e7c8b5 100644 --- a/llvm/test/tools/llvm-cov/Inputs/lineExecutionCounts.json +++ b/llvm/test/tools/llvm-cov/Inputs/lineExecutionCounts.json @@ -12,7 +12,7 @@ // Verify the Summary Section for the first file // CHECK-SAME: "summary":{ -// CHECK-SAME: "lines":{"count":20,"covered":16,"percent":80}, +// CHECK-SAME: "lines":{"count":20,"covered":18,"percent":90}, // CHECK-SAME: "functions":{"count":1,"covered":1,"percent":100}, // CHECK-SAME: "regions":{"count":11,"covered":8,"notcovered":3,"percent":72}}} @@ -30,7 +30,7 @@ // Full Export Summary // CHECK-SAME: "totals":{ -// CHECK-SAME: "lines":{"count":20,"covered":16,"percent":80}, +// CHECK-SAME: "lines":{"count":20,"covered":18,"percent":90}, // CHECK-SAME: "functions":{"count":1,"covered":1,"percent":100}, // CHECK-SAME: "instantiations":{"count":1,"covered":1,"percent":100}, // CHECK-SAME: "regions":{"count":11,"covered":8,"notcovered":3,"percent":72}} diff --git a/llvm/test/tools/llvm-cov/Inputs/regionMarkers.json b/llvm/test/tools/llvm-cov/Inputs/regionMarkers.json index d94bdf6e82f..0589f7b6626 100644 --- a/llvm/test/tools/llvm-cov/Inputs/regionMarkers.json +++ b/llvm/test/tools/llvm-cov/Inputs/regionMarkers.json @@ -12,7 +12,7 @@ // Verify the Summary Section for the first file // CHECK-SAME: "summary":{ -// CHECK-SAME: "lines":{"count":21,"covered":17,"percent":80}, +// CHECK-SAME: "lines":{"count":21,"covered":18,"percent":85}, // CHECK-SAME: "functions":{"count":1,"covered":1,"percent":100}, // CHECK-SAME: "regions":{"count":10,"covered":7,"notcovered":3,"percent":70}} @@ -29,7 +29,7 @@ // Full Export Summary // CHECK-SAME: "totals":{ -// CHECK-SAME: "lines":{"count":21,"covered":17,"percent":80}, +// CHECK-SAME: "lines":{"count":21,"covered":18,"percent":85}, // CHECK-SAME: "functions":{"count":1,"covered":1,"percent":100}, // CHECK-SAME: "instantiations":{"count":1,"covered":1,"percent":100}, // CHECK-SAME: "regions":{"count":10,"covered":7,"notcovered":3,"percent":70}} diff --git a/llvm/test/tools/llvm-cov/Inputs/showExpansions.json b/llvm/test/tools/llvm-cov/Inputs/showExpansions.json index 893e25a5dd0..d145f7d8b49 100644 --- a/llvm/test/tools/llvm-cov/Inputs/showExpansions.json +++ b/llvm/test/tools/llvm-cov/Inputs/showExpansions.json @@ -22,7 +22,7 @@ // Verify the Summary Section for the first file // CHECK-SAME: "summary":{ -// CHECK-SAME: "lines":{"count":17,"covered":15,"percent":88}, +// CHECK-SAME: "lines":{"count":5,"covered":5,"percent":100}, // CHECK-SAME: "functions":{"count":1,"covered":1,"percent":100}, // CHECK-SAME: "regions":{"count":13,"covered":12,"notcovered":1,"percent":92}} @@ -43,7 +43,7 @@ // Full Export Summary // CHECK-SAME: "totals":{ -// CHECK-SAME: "lines":{"count":17,"covered":15,"percent":88}, +// CHECK-SAME: "lines":{"count":5,"covered":5,"percent":100}, // CHECK-SAME: "functions":{"count":1,"covered":1,"percent":100}, // CHECK-SAME: "instantiations":{"count":1,"covered":1,"percent":100}, // CHECK-SAME: "regions":{"count":13,"covered":12,"notcovered":1,"percent":92}} diff --git a/llvm/test/tools/llvm-cov/showLineExecutionCounts.cpp b/llvm/test/tools/llvm-cov/showLineExecutionCounts.cpp index 39d31d20dd1..ba974dc4db5 100644 --- a/llvm/test/tools/llvm-cov/showLineExecutionCounts.cpp +++ b/llvm/test/tools/llvm-cov/showLineExecutionCounts.cpp @@ -86,7 +86,7 @@ int main() { // TEXT: [[@LINE]]| 161|int main( // HTML-INDEX: <td class='column-entry-green'> // HTML-INDEX: 100.00% (1/1) // HTML-INDEX: <td class='column-entry-yellow'> -// HTML-INDEX: 80.00% (16/20) +// HTML-INDEX: 90.00% (18/20) // HTML-INDEX: <td class='column-entry-red'> // HTML-INDEX: 72.73% (8/11) // HTML-INDEX: TOTALS |