MCPcopy Create free account
hub / github.com/OpenCppCoverage/OpenCppCoverage / AddLine

Method AddLine

Plugin/Exporter/FileCoverage.cpp:30–39  ·  view source on GitHub ↗

-------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

28
29 //-------------------------------------------------------------------------
30 void FileCoverage::AddLine(unsigned int lineNumber, bool hasBeenExecuted)
31 {
32 LineCoverage line{ lineNumber, hasBeenExecuted };
33
34 if (!lines_.emplace(lineNumber, line).second)
35 {
36 throw std::runtime_error("Line " + std::to_string(lineNumber) +
37 " already exists for " + path_.string());
38 }
39 }
40
41 //-------------------------------------------------------------------------
42 void FileCoverage::UpdateLine(unsigned int lineNumber, bool hasBeenExecuted)

Callers 13

TESTFunction · 0.80
FillSourcesFunction · 0.80
AddRandomFilesFunction · 0.80
CreateRandomCoverageDataFunction · 0.80
TEST_FFunction · 0.80
InitCoverageDataFromFunction · 0.80
CreateCoverageDataMethod · 0.80
AddFileCoverageToFunction · 0.80
SetFileLineCountMethod · 0.80
AddLinesToFileCoverageFunction · 0.80
AddRandomFileCoverageFunction · 0.80
FillCoverageDataFunction · 0.80

Calls

no outgoing calls

Tested by 10

TESTFunction · 0.64
FillSourcesFunction · 0.64
AddRandomFilesFunction · 0.64
CreateRandomCoverageDataFunction · 0.64
TEST_FFunction · 0.64
SetFileLineCountMethod · 0.64
AddLinesToFileCoverageFunction · 0.64
AddRandomFileCoverageFunction · 0.64
FillCoverageDataFunction · 0.64
TESTFunction · 0.64