| 23 | static json bad_uri = {{"myUri", "http:/hostname.com/"}}; |
| 24 | |
| 25 | static void uri_format_checker(const std::string &format, const std::string &value) |
| 26 | { |
| 27 | if (format == "uri") { |
| 28 | if (value.find("://") == std::string::npos) |
| 29 | throw std::invalid_argument("URI does not contain :// - invalid"); |
| 30 | } else |
| 31 | throw std::logic_error("Don't know how to validate " + format); |
| 32 | } |
| 33 | |
| 34 | int main() |
| 35 | { |
nothing calls this directly
no outgoing calls
no test coverage detected