parses an option and returns the string after the '=' character
| 6510 | |
| 6511 | // parses an option and returns the string after the '=' character |
| 6512 | bool parseOption(int argc, const char* const* argv, const char* pattern, String* value = nullptr, |
| 6513 | const String& defaultVal = String()) { |
| 6514 | if(value) |
| 6515 | *value = defaultVal; |
| 6516 | #ifndef DOCTEST_CONFIG_NO_UNPREFIXED_OPTIONS |
| 6517 | // offset (normally 3 for "dt-") to skip prefix |
| 6518 | if(parseOptionImpl(argc, argv, pattern + strlen(DOCTEST_CONFIG_OPTIONS_PREFIX), value)) |
| 6519 | return true; |
| 6520 | #endif // DOCTEST_CONFIG_NO_UNPREFIXED_OPTIONS |
| 6521 | return parseOptionImpl(argc, argv, pattern, value); |
| 6522 | } |
| 6523 | |
| 6524 | // locates a flag on the command line |
| 6525 | bool parseFlag(int argc, const char* const* argv, const char* pattern) { |
no test coverage detected