---------------------------------------------------------------------
| 28 | { |
| 29 | //--------------------------------------------------------------------- |
| 30 | CoverageRate ComputeFileCoverage(const Plugin::FileCoverage& file) |
| 31 | { |
| 32 | int executedLines = 0; |
| 33 | int unexecutedLines = 0; |
| 34 | |
| 35 | for (const auto& lineCoverage : file.GetLines()) |
| 36 | { |
| 37 | if (lineCoverage.HasBeenExecuted()) |
| 38 | ++executedLines; |
| 39 | else |
| 40 | ++unexecutedLines; |
| 41 | } |
| 42 | |
| 43 | return CoverageRate{executedLines, unexecutedLines}; |
| 44 | } |
| 45 | |
| 46 | //--------------------------------------------------------------------- |
| 47 | template<typename Object> |
no test coverage detected