MCPcopy Create free account
hub / github.com/danielaparker/jsoncons / test_parse_error

Function test_parse_error

test/corelib/src/json_parser_error_tests.cpp:16–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14using namespace jsoncons;
15
16void test_parse_error(const std::string& text, const std::error_code& ec)
17{
18 REQUIRE_THROWS(json::parse(text));
19 JSONCONS_TRY
20 {
21 json::parse(text);
22 }
23 JSONCONS_CATCH (const ser_error& e)
24 {
25 if (e.code() != ec)

Callers 1

Calls 1

parseFunction · 0.85

Tested by

no test coverage detected