diff options
author | Zach Mullen <zach.mullen@kitware.com> | 2014-05-27 19:44:46 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-05-28 16:25:50 (GMT) |
commit | deee7c42a2df8156ad81c371d0f1007286018f0f (patch) | |
tree | 1d5b8a05ca20808cf93614d395bc41e7b15795a9 | |
parent | 88b3dcb125db2c3ae64b69d74a9f58b3425012d0 (diff) | |
download | CMake-deee7c42a2df8156ad81c371d0f1007286018f0f.zip CMake-deee7c42a2df8156ad81c371d0f1007286018f0f.tar.gz CMake-deee7c42a2df8156ad81c371d0f1007286018f0f.tar.bz2 |
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.
-rw-r--r-- | Source/CTest/cmParsePythonCoverage.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/CTest/cmParsePythonCoverage.cxx b/Source/CTest/cmParsePythonCoverage.cxx index 68a6817..817b8dc 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; |