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

Function AddInputCoverages

CppCoverage/OptionsParser.cpp:161–183  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

159
160 //---------------------------------------------------------------------
161 void AddInputCoverages(const ProgramOptionsVariablesMap& variablesMap,
162 Options& options)
163 {
164 auto inputCoveragePaths =
165 variablesMap.GetOptionalValue<std::vector<std::string>>(
166 ProgramOptions::InputCoverageValue);
167
168 if (inputCoveragePaths)
169 {
170 for (const auto& path : *inputCoveragePaths)
171 {
172 if (!Tools::FileExists(path))
173 {
174 throw Plugin::OptionsParserException(
175 "Argument of " +
176 ProgramOptions::InputCoverageValue + " <" + path +
177 "> does not exist.");
178 }
179
180 options.AddInputCoveragePath(path);
181 }
182 }
183 }
184
185 //----------------------------------------------------------------------------
186 std::pair<fs::path, boost::optional<fs::path>>

Callers 1

ParseMethod · 0.85

Calls 3

FileExistsFunction · 0.85
AddInputCoveragePathMethod · 0.80

Tested by

no test coverage detected