From 8b6e2113b072b0cb198695dcd6cfc6384c1e98b8 Mon Sep 17 00:00:00 2001 From: Josh Haberman Date: Tue, 16 Aug 2016 16:39:16 -0700 Subject: WIP. --- tests/pb/test_decoder.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'tests/pb') diff --git a/tests/pb/test_decoder.cc b/tests/pb/test_decoder.cc index 702366a..d272ea5 100644 --- a/tests/pb/test_decoder.cc +++ b/tests/pb/test_decoder.cc @@ -288,10 +288,11 @@ size_t value_string(int* depth, const uint32_t* num, const char* buf, } bool endstr(int* depth, const uint32_t* num) { - UPB_UNUSED(depth); UPB_UNUSED(num); check_stack_alignment(); - output.append("\"\n"); + output.append("\n"); + indentbuf(&output, *depth); + appendf(&output, "%" PRIu32 ":\"\n", *num); return true; } @@ -1096,10 +1097,12 @@ void test_valid() { LINE("<") LINE("%u:{") LINE(" <") - LINE(" %u:(5)\"abcde\"") + LINE(" %u:(5)\"abcde") + LINE(" %u:\"") LINE(" >") LINE("}") - LINE(">"), msg_fn, UPB_DESCRIPTOR_TYPE_STRING); + LINE(">"), msg_fn, UPB_DESCRIPTOR_TYPE_STRING, + UPB_DESCRIPTOR_TYPE_STRING); // Test implicit startseq/endseq. uint32_t repfl_fn = rep_fn(UPB_DESCRIPTOR_TYPE_FLOAT); -- cgit v1.2.3