MCPcopy Create free account
hub / github.com/apache/qpid-proton / validate

Method validate

tests/include/catch.hpp:9459–9474  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9457 }
9458
9459 auto validate() const -> Result override {
9460 if( m_optNames.empty() )
9461 return Result::logicError( "No options supplied to Opt" );
9462 for( auto const &name : m_optNames ) {
9463 if( name.empty() )
9464 return Result::logicError( "Option name cannot be empty" );
9465#ifdef CATCH_PLATFORM_WINDOWS
9466 if( name[0] != '-' && name[0] != '/' )
9467 return Result::logicError( "Option name must begin with '-' or '/'" );
9468#else
9469 if( name[0] != '-' )
9470 return Result::logicError( "Option name must begin with '-'" );
9471#endif
9472 }
9473 return ParserRefImpl::validate();
9474 }
9475 };
9476
9477 struct Help : Opt {

Callers 1

validateMethod · 0.45

Calls 2

validateFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected