summaryrefslogtreecommitdiffstats
path: root/Source/CTest
diff options
context:
space:
mode:
authorZach Mullen <zach.mullen@kitware.com>2014-05-27 19:44:46 (GMT)
committerBrad King <brad.king@kitware.com>2014-05-28 16:25:50 (GMT)
commitdeee7c42a2df8156ad81c371d0f1007286018f0f (patch)
tree1d5b8a05ca20808cf93614d395bc41e7b15795a9 /Source/CTest
parent88b3dcb125db2c3ae64b69d74a9f58b3425012d0 (diff)
downloadCMake-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.
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 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;