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

Function helperTestQueryString

3rd/uriparser/test/test.cpp:1663–1680  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1661
1662namespace {
1663 void helperTestQueryString(char const * uriString, int pairsExpected) {
1664 UriParserStateA state;
1665 UriUriA uri;
1666 state.uri = &uri;
1667 int res = uriParseUriA(&state, uriString);
1668 ASSERT_TRUE(res == URI_SUCCESS);
1669
1670 UriQueryListA * queryList = NULL;
1671 int itemCount = 0;
1672
1673 res = uriDissectQueryMallocA(&queryList, &itemCount,
1674 uri.query.first, uri.query.afterLast);
1675 ASSERT_TRUE(res == URI_SUCCESS);
1676 ASSERT_TRUE(queryList != NULL);
1677 ASSERT_TRUE(itemCount == pairsExpected);
1678 uriFreeQueryListA(queryList);
1679 uriFreeUriMembersA(&uri);
1680 }
1681} // namespace
1682
1683TEST(UriSuite, TestCrashMakeOwnerBug20080207) {

Callers 1

TESTFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected