MCPcopy Create free account
hub / github.com/WarmUpTill/SceneSwitcher / applyCommandLine

Method applyCommandLine

tests/catch.hpp:15602–15624  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15600}
15601
15602int Session::applyCommandLine(int argc, char const *const *argv)
15603{
15604 if (m_startupExceptions)
15605 return 1;
15606
15607 auto result = m_cli.parse(clara::Args(argc, argv));
15608 if (!result) {
15609 config();
15610 getCurrentMutableContext().setConfig(m_config);
15611 Catch::cerr()
15612 << Colour(Colour::Red) << "\nError(s) in input:\n"
15613 << Column(result.errorMessage()).indent(2) << "\n\n";
15614 Catch::cerr() << "Run with -? for usage\n" << std::endl;
15615 return MaxExitCode;
15616 }
15617
15618 if (m_configData.showHelp)
15619 showHelp();
15620 if (m_configData.libIdentify)
15621 libIdentify();
15622 m_config.reset();
15623 return 0;
15624}
15625
15626#if defined(CATCH_CONFIG_WCHAR) && defined(_WIN32) && defined(UNICODE)
15627int Session::applyCommandLine(int argc, wchar_t const *const *argv)

Callers

nothing calls this directly

Calls 8

ColourClass · 0.85
ColumnClass · 0.85
setConfigMethod · 0.80
errorMessageMethod · 0.80
ArgsClass · 0.70
parseMethod · 0.45
indentMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected