pull/13171/head
Josh Haberman 9 years ago
parent fa338b70a6
commit 8b6e2113b0
  1. 11
      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) { bool endstr(int* depth, const uint32_t* num) {
UPB_UNUSED(depth);
UPB_UNUSED(num); UPB_UNUSED(num);
check_stack_alignment(); check_stack_alignment();
output.append("\"\n"); output.append("\n");
indentbuf(&output, *depth);
appendf(&output, "%" PRIu32 ":\"\n", *num);
return true; return true;
} }
@ -1096,10 +1097,12 @@ void test_valid() {
LINE("<") LINE("<")
LINE("%u:{") LINE("%u:{")
LINE(" <") LINE(" <")
LINE(" %u:(5)\"abcde\"") LINE(" %u:(5)\"abcde")
LINE(" %u:\"")
LINE(" >") LINE(" >")
LINE("}") LINE("}")
LINE(">"), msg_fn, UPB_DESCRIPTOR_TYPE_STRING); LINE(">"), msg_fn, UPB_DESCRIPTOR_TYPE_STRING,
UPB_DESCRIPTOR_TYPE_STRING);
// Test implicit startseq/endseq. // Test implicit startseq/endseq.
uint32_t repfl_fn = rep_fn(UPB_DESCRIPTOR_TYPE_FLOAT); uint32_t repfl_fn = rep_fn(UPB_DESCRIPTOR_TYPE_FLOAT);

Loading…
Cancel
Save