MCPcopy Create free account
hub / github.com/catchorg/Catch2 / main

Function main

tools/misc/coverage-helper.cpp:125–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123// [3]+: the actual command
124
125int main(int argc, char** argv) {
126 std::vector<std::string> args(argv, argv + argc);
127 auto sep = std::find(begin(args), end(args), separator);
128 assert(sep - begin(args) == 2 && "Structure differs from expected!");
129
130 auto num = parse_log_file_arg(args[1]);
131
132 auto cmdline = std::accumulate(++sep, end(args), std::string{}, [] (const std::string& lhs, const std::string& rhs) {
133 return lhs + ' ' + escape_arg(rhs);
134 });
135
136 try {
137 return exec_cmd(cmdline, num, windowsify_path(catch_path(args[0])));
138 } catch (std::exception const& ex) {
139 std::cerr << "Helper failed with: '" << ex.what() << "'\n";
140 return 12;
141 }
142}

Callers

nothing calls this directly

Calls 6

parse_log_file_argFunction · 0.85
escape_argFunction · 0.85
exec_cmdFunction · 0.85
windowsify_pathFunction · 0.85
catch_pathFunction · 0.85
whatMethod · 0.45

Tested by

no test coverage detected