summaryrefslogtreecommitdiff
path: root/tests/json
diff options
context:
space:
mode:
authorJosh Haberman <jhaberman@gmail.com>2015-08-14 18:54:11 -0700
committerJosh Haberman <jhaberman@gmail.com>2015-08-14 18:54:11 -0700
commit146a9c22efac6cb746ef4024144f28af891dd2b4 (patch)
tree3e43d77eaa169772bd72e6dabfabf44b2e38f7c6 /tests/json
parent782670e6a3d924a66adf23c94732603103b97223 (diff)
Added lots of decoder tests and fixed lots of bugs.
Diffstat (limited to 'tests/json')
-rw-r--r--tests/json/test_json.cc6
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(),
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback