MCPcopy Create free account
hub / github.com/FidoProject/Fido / applyCommandLine

Method applyCommandLine

tests/catch.h:6309–6329  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6307 }
6308
6309 int applyCommandLine( int argc, char const* argv[], OnUnusedOptions::DoWhat unusedOptionBehaviour = OnUnusedOptions::Fail ) {
6310 try {
6311 m_cli.setThrowOnUnrecognisedTokens( unusedOptionBehaviour == OnUnusedOptions::Fail );
6312 m_unusedTokens = m_cli.parseInto( argc, argv, m_configData );
6313 if( m_configData.showHelp )
6314 showHelp( m_configData.processName );
6315 m_config.reset();
6316 }
6317 catch( std::exception& ex ) {
6318 {
6319 Colour colourGuard( Colour::Red );
6320 Catch::cerr()
6321 << "\nError(s) in input:\n"
6322 << Text( ex.what(), TextAttributes().setIndent(2) )
6323 << "\n\n";
6324 }
6325 m_cli.usage( Catch::cout(), m_configData.processName );
6326 return (std::numeric_limits<int>::max)();
6327 }
6328 return 0;
6329 }
6330
6331 void useConfigData( ConfigData const& _configData ) {
6332 m_configData = _configData;

Callers

nothing calls this directly

Calls 6

TextClass · 0.85
TextAttributesClass · 0.85
parseIntoMethod · 0.80
whatMethod · 0.80
usageMethod · 0.80
resetMethod · 0.45

Tested by

no test coverage detected