summaryrefslogtreecommitdiff
path: root/Source/CTest
diff options
context:
space:
mode:
authorZach Mullen <zach.mullen@kitware.com>2014-05-27 15:44:46 -0400
committerBrad King <brad.king@kitware.com>2014-05-28 12:25:50 -0400
commitdeee7c42a2df8156ad81c371d0f1007286018f0f (patch)
tree1d5b8a05ca20808cf93614d395bc41e7b15795a9 /Source/CTest
parent88b3dcb125db2c3ae64b69d74a9f58b3425012d0 (diff)
downloadcmake-deee7c42a2df8156ad81c371d0f1007286018f0f.tar.gz
CTest: Fix Python coverage.py off-by-one error in results
The cobertura format uses line numbers indexed starting at 1, and CTest uses a vector indexed starting at 0 to store them.
Diffstat (limited to 'Source/CTest')
-rw-r--r--Source/CTest/cmParsePythonCoverage.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/CTest/cmParsePythonCoverage.cxx b/Source/CTest/cmParsePythonCoverage.cxx
index 68a6817afe..817b8dca3d 100644
--- a/Source/CTest/cmParsePythonCoverage.cxx
+++ b/Source/CTest/cmParsePythonCoverage.cxx
@@ -79,11 +79,11 @@ protected:
curNumber = atoi(atts[tagCount+1]);
}
- if(curHits > -1 && curNumber > -1)
+ if(curHits > -1 && curNumber > 0)
{
FileLinesType& curFileLines =
this->Coverage.TotalCoverage[this->CurFileName];
- curFileLines[curNumber] = curHits;
+ curFileLines[curNumber-1] = curHits;
break;
}
++tagCount;