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

Function TEST

tests/quote_test.cpp:42–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42TEST(Quote, Normal) {
43 std::vector<quoteTests> tests = {
44 {"", "\"\""},
45 {"a", "\"a\""},
46 {"\"", "\"\\\"\""},
47 {"\\", "\"\\\\\""},
48 {
49 "\u666fhello\b\f\n\r\t\\\"world",
50 R"("景hello\b\f\n\r\t\\\"world")",
51 },
52 {
53 "<a href=\"http://twitter.com/download/iphone\" "
54 "rel=\"nofollow\">Twitter for iPhone</a>",
55 R"("<a href=\"http://twitter.com/download/iphone\" rel=\"nofollow\">Twitter for iPhone</a>")",
56 }};
57 for (const auto& t : tests) {
58 TestQuote(t.input, t.expect);
59 }
60}
61
62TEST(Quote, DiffSize) {
63 for (size_t i = 0; i < 300; i++) {

Callers

nothing calls this directly

Calls 1

TestQuoteFunction · 0.85

Tested by

no test coverage detected