MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/SPlisHSPlasH / applyCommandLine

Method applyCommandLine

extern/Catch2/catch.hpp:13459–13482  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13457 }
13458
13459 int Session::applyCommandLine( int argc, char const * const * argv ) {
13460 if( m_startupExceptions )
13461 return 1;
13462
13463 auto result = m_cli.parse( clara::Args( argc, argv ) );
13464 if( !result ) {
13465 config();
13466 getCurrentMutableContext().setConfig(m_config);
13467 Catch::cerr()
13468 << Colour( Colour::Red )
13469 << "\nError(s) in input:\n"
13470 << Column( result.errorMessage() ).indent( 2 )
13471 << "\n\n";
13472 Catch::cerr() << "Run with -? for usage\n" << std::endl;
13473 return MaxExitCode;
13474 }
13475
13476 if( m_configData.showHelp )
13477 showHelp();
13478 if( m_configData.libIdentify )
13479 libIdentify();
13480 m_config.reset();
13481 return 0;
13482 }
13483
13484#if defined(CATCH_CONFIG_WCHAR) && defined(_WIN32) && defined(UNICODE)
13485 int 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