| 857 | |
| 858 | namespace { |
| 859 | bool testUnescapingHelper(const wchar_t * input, const wchar_t * output, |
| 860 | bool plusToSpace = false, UriBreakConversion breakConversion = URI_BR_DONT_TOUCH) { |
| 861 | wchar_t * working = new wchar_t[URI_STRLEN(input) + 1]; |
| 862 | wcscpy(working, input); |
| 863 | const wchar_t * newTermZero = uriUnescapeInPlaceExW(working, |
| 864 | plusToSpace ? URI_TRUE : URI_FALSE, breakConversion); |
| 865 | const bool success = ((newTermZero == working + wcslen(output)) |
| 866 | && !wcscmp(working, output)); |
| 867 | delete[] working; |
| 868 | return success; |
| 869 | } |
| 870 | } // namespace |
| 871 | |
| 872 | TEST(UriSuite, TestUnescaping) { |