MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / validate

Method validate

extlibs/catch/include/catch/catch.hpp:9140–9155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9138 }
9139
9140 auto validate() const -> Result override {
9141 if( m_optNames.empty() )
9142 return Result::logicError( "No options supplied to Opt" );
9143 for( auto const &name : m_optNames ) {
9144 if( name.empty() )
9145 return Result::logicError( "Option name cannot be empty" );
9146#ifdef CATCH_PLATFORM_WINDOWS
9147 if( name[0] != '-' && name[0] != '/' )
9148 return Result::logicError( "Option name must begin with '-' or '/'" );
9149#else
9150 if( name[0] != '-' )
9151 return Result::logicError( "Option name must begin with '-'" );
9152#endif
9153 }
9154 return ParserRefImpl::validate();
9155 }
9156 };
9157
9158 struct Help : Opt {

Callers 1

validateMethod · 0.45

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected