From 754b9f1cfdf59104fa62cfaf99f21e5a817d281b Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Tue, 15 Jan 2019 03:37:34 -0800 Subject: All tests pass again! --- tests/pb/test_decoder.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'tests/pb/test_decoder.cc') diff --git a/tests/pb/test_decoder.cc b/tests/pb/test_decoder.cc index b2dd812..3c41801 100644 --- a/tests/pb/test_decoder.cc +++ b/tests/pb/test_decoder.cc @@ -454,8 +454,9 @@ upb::pb::DecoderMethodPtr global_method; upb::pb::DecoderPtr CreateDecoder(upb::Arena* arena, upb::pb::DecoderMethodPtr method, - upb::Sink sink) { - upb::pb::DecoderPtr ret = upb::pb::DecoderPtr::Create(arena, method, sink); + upb::Sink sink, upb::Status* status) { + upb::pb::DecoderPtr ret = + upb::pb::DecoderPtr::Create(arena, method, sink, status); ret.set_max_nesting(MAX_NESTING); return ret; } @@ -556,7 +557,7 @@ void do_run_decoder(VerboseParserEnvironment* env, upb::pb::DecoderPtr decoder, void run_decoder(const string& proto, const string* expected_output) { VerboseParserEnvironment env(filter_hash != 0); upb::Sink sink(global_handlers, &closures[0]); - upb::pb::DecoderPtr decoder = CreateDecoder(env.arena(), global_method, sink); + upb::pb::DecoderPtr decoder = CreateDecoder(env.arena(), global_method, sink, env.status()); env.ResetBytesSink(decoder.input()); for (size_t i = 0; i < proto.size(); i++) { for (size_t j = i; j < UPB_MIN(proto.size(), i + 5); j++) { @@ -874,7 +875,8 @@ void test_valid() { upb::Status status; upb::Arena arena; upb::Sink sink(global_handlers, &closures[0]); - upb::pb::DecoderPtr decoder = CreateDecoder(&arena, global_method, sink); + upb::pb::DecoderPtr decoder = + CreateDecoder(&arena, global_method, sink, &status); output.clear(); bool ok = upb::PutBuffer(std::string(), decoder.input()); ASSERT(ok); @@ -1161,7 +1163,7 @@ void test_emptyhandlers(upb::SymbolTable* symtab, bool allowjit) { VerboseParserEnvironment env(filter_hash != 0); upb::Sink sink(global_method.dest_handlers(), &closures[0]); upb::pb::DecoderPtr decoder = - CreateDecoder(env.arena(), global_method, sink); + CreateDecoder(env.arena(), global_method, sink, env.status()); env.ResetBytesSink(decoder.input()); env.Reset(testdata[i].data, testdata[i].length, true, false); ASSERT(env.Start()); -- cgit v1.2.3