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

Function TestParseError

tests/parsenumber_test.cpp:60–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60void TestParseError(const std::string& input, size_t off, SonicError err) {
61 Document doc;
62 doc.Parse(input.data(), input.size());
63 EXPECT_TRUE(doc.HasParseError()) << input;
64 EXPECT_EQ(doc.GetParseError(), err) << input;
65 // TODO: test offset
66 (void)(off);
67}
68
69void TestParseInf(size_t off, const std::string& input) {
70 TestParseError(input, off, kParseErrorInfinity);

Callers 2

TestParseInfFunction · 0.85
TestParseInvalFunction · 0.85

Calls 3

ParseMethod · 0.80
HasParseErrorMethod · 0.80
GetParseErrorMethod · 0.80

Tested by

no test coverage detected