diff options
author | Josh Haberman <jhaberman@gmail.com> | 2015-08-14 18:54:11 -0700 |
---|---|---|
committer | Josh Haberman <jhaberman@gmail.com> | 2015-08-14 18:54:11 -0700 |
commit | 146a9c22efac6cb746ef4024144f28af891dd2b4 (patch) | |
tree | 3e43d77eaa169772bd72e6dabfabf44b2e38f7c6 /tests/json | |
parent | 782670e6a3d924a66adf23c94732603103b97223 (diff) |
Added lots of decoder tests and fixed lots of bugs.
Diffstat (limited to 'tests/json')
-rw-r--r-- | tests/json/test_json.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/json/test_json.cc b/tests/json/test_json.cc index c483cf0..b4346c5 100644 --- a/tests/json/test_json.cc +++ b/tests/json/test_json.cc @@ -295,17 +295,15 @@ void test_json_roundtrip_message(const char* json_src, upb::json::Parser* parser = upb::json::Parser::Create(env.env(), printer->input()); env.ResetBytesSink(parser->input()); - env.Reset(json_src, strlen(json_src), false); + env.Reset(json_src, strlen(json_src), false, false); bool ok = env.Start() && env.ParseBuffer(seam) && env.ParseBuffer(-1) && env.End(); - if (!ok) { - fprintf(stderr, "upb parse error: %s\n", env.status().error_message()); - } ASSERT(ok); + ASSERT(env.CheckConsistency()); if (memcmp(json_expected, data_sink.Data().data(), |