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

Function test_parse_ec

test/corelib/src/json_parser_error_tests.cpp:34–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34void test_parse_ec(const std::string& text, const std::error_code& expected)
35{
36 std::error_code ec;
37
38 std::istringstream is(text);
39 json_decoder<json> decoder;
40 json_stream_reader reader(is,decoder);
41
42 reader.read(ec);
43 //std::cerr << text << '\n';
44 //std::cerr << ec.message()
45 // << " at line " << reader.line()
46 // << " and column " << reader.column() << '\n';
47
48 CHECK(ec);
49 CHECK(expected == ec);
50}
51
52TEST_CASE("test_parse_missing_separator")
53{

Callers 1

Calls 1

readMethod · 0.45

Tested by

no test coverage detected