MCPcopy Create free account
hub / github.com/CodingGay/BlackDex / validate

Method validate

Bcore/src/main/cpp/Dobby/tests/catch.hpp:6039–6054  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6037 }
6038
6039 auto validate() const -> Result override {
6040 if (m_optNames.empty())
6041 return Result::logicError("No options supplied to Opt");
6042 for (auto const &name : m_optNames) {
6043 if (name.empty())
6044 return Result::logicError("Option name cannot be empty");
6045#ifdef CATCH_PLATFORM_WINDOWS
6046 if (name[0] != '-' && name[0] != '/')
6047 return Result::logicError("Option name must begin with '-' or '/'");
6048#else
6049 if (name[0] != '-')
6050 return Result::logicError("Option name must begin with '-'");
6051#endif
6052 }
6053 return ParserRefImpl::validate();
6054 }
6055};
6056
6057struct Help : Opt {

Callers 1

validateMethod · 0.45

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected