From 146a9c22efac6cb746ef4024144f28af891dd2b4 Mon Sep 17 00:00:00 2001 From: Josh Haberman Date: Fri, 14 Aug 2015 18:54:11 -0700 Subject: Added lots of decoder tests and fixed lots of bugs. --- tests/json/test_json.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'tests/json/test_json.cc') 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(), -- cgit v1.2.3