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.
This commit is contained in:
parent
88b3dcb125
commit
deee7c42a2
|
@ -79,11 +79,11 @@ protected:
|
||||||
curNumber = atoi(atts[tagCount+1]);
|
curNumber = atoi(atts[tagCount+1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(curHits > -1 && curNumber > -1)
|
if(curHits > -1 && curNumber > 0)
|
||||||
{
|
{
|
||||||
FileLinesType& curFileLines =
|
FileLinesType& curFileLines =
|
||||||
this->Coverage.TotalCoverage[this->CurFileName];
|
this->Coverage.TotalCoverage[this->CurFileName];
|
||||||
curFileLines[curNumber] = curHits;
|
curFileLines[curNumber-1] = curHits;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
++tagCount;
|
++tagCount;
|
||||||
|
|
Loading…
Reference in New Issue