| 412 | |
| 413 | |
| 414 | bool testBadUri(const char * uriText, int expectedErrorOffset = -1) { |
| 415 | const char * errorPos = NULL; |
| 416 | const int ret = testParseUri(uriText, &errorPos); |
| 417 | return ((ret == URI_ERROR_SYNTAX) |
| 418 | && (errorPos != NULL) |
| 419 | && ( |
| 420 | (expectedErrorOffset == -1) |
| 421 | || (errorPos == (uriText + expectedErrorOffset)) |
| 422 | )); |
| 423 | } |
| 424 | |
| 425 | } // namespace |
| 426 |