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

Function TestFailed

tests/parse_schema_test.cpp:52–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50}
51
52void TestFailed(const std::string schema, const std::string json) {
53 Document doc;
54 doc.Parse(schema);
55 if (doc.HasParseError())
56 FAIL() << "failed parsing schema: " << schema << std::endl;
57
58 doc.ParseSchema(json);
59
60 EXPECT_TRUE(doc.HasParseError())
61 << "unexpect parsing json success: " << json << std::endl;
62}
63
64TEST(ParseSchema, SuccessBasic) {
65 TestSuccess(

Callers 1

TESTFunction · 0.85

Calls 2

ParseMethod · 0.80
HasParseErrorMethod · 0.80

Tested by

no test coverage detected