MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / testUnescapingHelper

Function testUnescapingHelper

3rd/uriparser/test/test.cpp:859–869  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

857
858namespace {
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
872TEST(UriSuite, TestUnescaping) {

Callers 1

TESTFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected