summaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2017-11-09 02:33:43 +0000
committerVedant Kumar <vsk@apple.com>2017-11-09 02:33:43 +0000
commitf361756cf35f7567d56bb12621b99599a8c539e9 (patch)
treed8007efb9c8139bce06a81fa4b77ec6ee9146a1c /unittests
parent9960086c1116025fa44f27d30fa6b20f53fc5373 (diff)
[Coverage] Use the wrapped segment when a line has entry segments
We've worked around bugs in the frontend by ignoring the count from wrapped segments when a line has at least one region entry segment. Those frontend bugs are now fixed, so it's time to regenerate the checked-in covmapping files and remove the workaround. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317761 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r--unittests/ProfileData/CoverageMappingTest.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/unittests/ProfileData/CoverageMappingTest.cpp b/unittests/ProfileData/CoverageMappingTest.cpp
index ce52c6f93ee..7c94ece1adc 100644
--- a/unittests/ProfileData/CoverageMappingTest.cpp
+++ b/unittests/ProfileData/CoverageMappingTest.cpp
@@ -648,9 +648,10 @@ TEST_P(CoverageMappingTest, test_line_coverage_iterator) {
CoverageData Data = LoadedCoverage->getCoverageForFile("file1");
unsigned Line = 0;
- unsigned LineCounts[] = {20, 20, 20, 20, 10, 10, 10, 10, 10, 0, 0};
+ unsigned LineCounts[] = {20, 20, 20, 20, 30, 10, 10, 10, 10, 0, 0};
for (const auto &LCS : getLineCoverageStats(Data)) {
ASSERT_EQ(Line + 1, LCS.getLine());
+ errs() << "Line: " << Line + 1 << ", count = " << LCS.getExecutionCount() << "\n";
ASSERT_EQ(LineCounts[Line], LCS.getExecutionCount());
++Line;
}