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

Method MergeFileCoverage

CppCoverage/CoverageDataMerger.cpp:159–175  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

157
158 //-------------------------------------------------------------------------
159 void CoverageDataMerger::MergeFileCoverage(Plugin::CoverageData& coverageData) const
160 {
161 std::map<std::filesystem::path, std::vector<Plugin::FileCoverage*>> fileCoveragesByPath;
162
163 for (const auto& module : coverageData.GetModules())
164 {
165 for (const auto& file : module->GetFiles())
166 fileCoveragesByPath[file->GetPath()].push_back(file.get());
167 }
168
169 for (const auto& fileCoverageByPath : fileCoveragesByPath)
170 {
171 const auto& fileCoverages = fileCoverageByPath.second;
172
173 MergeFileCoverages(fileCoverages);
174 }
175 }
176}

Callers 3

TEST_FFunction · 0.80
TESTFunction · 0.80
RunFunction · 0.80

Calls 1

MergeFileCoveragesFunction · 0.85

Tested by 2

TEST_FFunction · 0.64
TESTFunction · 0.64