MCPcopy Create free account
hub / github.com/bytedance/sonic-cpp / TestQuote

Function TestQuote

tests/quote_test.cpp:34–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32} quoteTests;
33
34void TestQuote(const std::string& input, const std::string& expect) {
35 size_t n = input.size();
36 auto buf = std::unique_ptr<char[]>(new char[(n + 2) * 6 + 32]);
37 char* end = Quote(input.data(), n, buf.get());
38 *end = '\0';
39 EXPECT_STREQ(buf.get(), expect.data());
40}
41
42TEST(Quote, Normal) {
43 std::vector<quoteTests> tests = {

Callers 1

TESTFunction · 0.85

Calls 1

QuoteFunction · 0.50

Tested by

no test coverage detected