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

Method validate

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

Source from the content-addressed store, hash-verified

9371 }
9372
9373 auto validate() const -> Result override {
9374 if( m_optNames.empty() )
9375 return Result::logicError( "No options supplied to Opt" );
9376 for( auto const &name : m_optNames ) {
9377 if( name.empty() )
9378 return Result::logicError( "Option name cannot be empty" );
9379#ifdef CATCH_PLATFORM_WINDOWS
9380 if( name[0] != '-' && name[0] != '/' )
9381 return Result::logicError( "Option name must begin with '-' or '/'" );
9382#else
9383 if( name[0] != '-' )
9384 return Result::logicError( "Option name must begin with '-'" );
9385#endif
9386 }
9387 return ParserRefImpl::validate();
9388 }
9389 };
9390
9391 struct Help : Opt {

Callers 1

validateMethod · 0.45

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected