MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/TriangleMeshDistance / validate

Method validate

tests/catch.hpp:7346–7361  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7344 }
7345
7346 auto validate() const -> Result override {
7347 if( m_optNames.empty() )
7348 return Result::logicError( "No options supplied to Opt" );
7349 for( auto const &name : m_optNames ) {
7350 if( name.empty() )
7351 return Result::logicError( "Option name cannot be empty" );
7352#ifdef CATCH_PLATFORM_WINDOWS
7353 if( name[0] != '-' && name[0] != '/' )
7354 return Result::logicError( "Option name must begin with '-' or '/'" );
7355#else
7356 if( name[0] != '-' )
7357 return Result::logicError( "Option name must begin with '-'" );
7358#endif
7359 }
7360 return ParserRefImpl::validate();
7361 }
7362 };
7363
7364 struct Help : Opt {

Callers 1

validateMethod · 0.45

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected