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

Method GetRate

CppCoverage/CoverageRate.cpp:54–61  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

52
53 //-------------------------------------------------------------------------
54 double CoverageRate::GetRate() const
55 {
56 auto totalLines = executedLinesCount_ + unexecutedLinesCount_;
57
58 if (totalLines == 0)
59 return 1.0;
60 return static_cast<double>(executedLinesCount_) / totalLines;
61 }
62
63 //-------------------------------------------------------------------------
64 int CoverageRate::GetPercentRate() const

Callers 2

TEST_FFunction · 0.80
SetCoverageFunction · 0.80

Calls

no outgoing calls

Tested by 1

TEST_FFunction · 0.64