void RunTest(const uint8_t *in, size_t inlen, const char *out) { TextBuf input(in, inlen); TextBuf expected(out); RunTestCopyEx(input, expected); RunTestCopyExToNul(input, expected); RunTestBuf(in, inlen, out, strlen(out)+1, IB_OK); }
TEST_P(TestEscapeJSONCStrings, simple_pairs) { TestEscapeJSONCStrings_t p = GetParam(); TextBuf input(p.input); TextBuf expected(p.expected); RunTestInplaceNul(input, expected); RunTestInplaceEx(input, expected); RunTestCowNul(input, expected); RunTestCowEx(input, expected); RunTestCopyNul(input, expected); RunTestCopyEx(input, expected); RunTestBuf(p.input, p.expected, strlen(p.expected)+1, IB_OK); }