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

Function FillModule

CppCoverage/CoverageDataMerger.cpp:102–117  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

100
101 //---------------------------------------------------------------------
102 void FillModule(
103 Plugin::ModuleCoverage& module,
104 const std::vector<Plugin::ModuleCoverage*>& modules)
105 {
106 std::map<fs::path, std::vector<Plugin::FileCoverage*>> filesByPath =
107 GroupChildrenByKey<Plugin::ModuleCoverage*, fs::path, Plugin::FileCoverage>(
108 modules,
109 [](const Plugin::ModuleCoverage* m) -> const Plugin::ModuleCoverage::T_FileCoverageCollection&{ return m->GetFiles(); },
110 [](const Plugin::FileCoverage& file) -> const fs::path&{ return file.GetPath(); });
111
112 for (const auto& pair : filesByPath)
113 {
114 auto& file = module.AddFile(pair.first);
115 FillFiles(file, pair.second);
116 }
117 }
118
119 //-------------------------------------------------------------------------
120 void MergeFileCoverages(const std::vector<Plugin::FileCoverage*>& fileCoverages)

Callers 1

MergeMethod · 0.85

Calls 2

FillFilesFunction · 0.85
AddFileMethod · 0.80

Tested by

no test coverage detected