MCPcopy Create free account
hub / github.com/Profactor/cv-plot / applyCommandLine

Method applyCommandLine

CvPlot/ext/catch2/inc/catch.hpp:13222–13245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13220 }
13221
13222 int Session::applyCommandLine( int argc, char const * const * argv ) {
13223 if( m_startupExceptions )
13224 return 1;
13225
13226 auto result = m_cli.parse( clara::Args( argc, argv ) );
13227 if( !result ) {
13228 config();
13229 getCurrentMutableContext().setConfig(m_config);
13230 Catch::cerr()
13231 << Colour( Colour::Red )
13232 << "\nError(s) in input:\n"
13233 << Column( result.errorMessage() ).indent( 2 )
13234 << "\n\n";
13235 Catch::cerr() << "Run with -? for usage\n" << std::endl;
13236 return MaxExitCode;
13237 }
13238
13239 if( m_configData.showHelp )
13240 showHelp();
13241 if( m_configData.libIdentify )
13242 libIdentify();
13243 m_config.reset();
13244 return 0;
13245 }
13246
13247#if defined(CATCH_CONFIG_WCHAR) && defined(_WIN32) && defined(UNICODE)
13248 int Session::applyCommandLine( int argc, wchar_t const * const * argv ) {

Callers

nothing calls this directly

Calls 8

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

Tested by

no test coverage detected