diff options
author | Josh Haberman <jhaberman@gmail.com> | 2016-08-16 16:39:16 -0700 |
---|---|---|
committer | Josh Haberman <jhaberman@gmail.com> | 2016-08-16 16:39:16 -0700 |
commit | 8b6e2113b072b0cb198695dcd6cfc6384c1e98b8 (patch) | |
tree | 8b8c2af4a1d8f5a5e9af0387aa51733fd45b8404 /tests/pb/test_decoder.cc | |
parent | fa338b70a602d9f5657528d0322535959a92d4b0 (diff) |
WIP.
Diffstat (limited to 'tests/pb/test_decoder.cc')
-rw-r--r-- | tests/pb/test_decoder.cc | 11 |
1 files changed, 7 insertions, 4 deletions
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); |