diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_cpp.cc | 1 | ||||
-rw-r--r-- | tests/test_decoder.c | 2 | ||||
-rw-r--r-- | tests/test_varint.c | 1 | ||||
-rw-r--r-- | tests/tests.c | 8 |
4 files changed, 8 insertions, 4 deletions
diff --git a/tests/test_cpp.cc b/tests/test_cpp.cc index 11542bf..ecf27bf 100644 --- a/tests/test_cpp.cc +++ b/tests/test_cpp.cc @@ -7,6 +7,7 @@ * Tests for C++ wrappers. */ +#include <stdio.h> #include <iostream> #include "upb/def.hpp" #include "upb/pb/glue.hpp" diff --git a/tests/test_decoder.c b/tests/test_decoder.c index 1994501..84a90cd 100644 --- a/tests/test_decoder.c +++ b/tests/test_decoder.c @@ -52,7 +52,7 @@ int main(int argc, char *argv[]) { upb_decoder d; upb_decoder_init(&d, handlers); - upb_decoder_reset(&d, upb_stdio_bytesrc(&in), 0, UPB_NONDELIMITED, p); + upb_decoder_reset(&d, upb_stdio_allbytes(&in), p); upb_status_clear(&status); upb_decoder_decode(&d, &status); diff --git a/tests/test_varint.c b/tests/test_varint.c index 7dce6ab..4c076b3 100644 --- a/tests/test_varint.c +++ b/tests/test_varint.c @@ -4,6 +4,7 @@ * Copyright (c) 2011 Google Inc. See LICENSE for details. */ +#include <stdio.h> #include "upb/pb/varint.h" #include "upb_test.h" diff --git a/tests/tests.c b/tests/tests.c index e8c335b..83fb3ef 100644 --- a/tests/tests.c +++ b/tests/tests.c @@ -16,15 +16,16 @@ static upb_symtab *load_test_proto() { ASSERT(s); upb_status status = UPB_STATUS_INIT; if (!upb_load_descriptor_file_into_symtab(s, descriptor_file, &status)) { - fprintf(stderr, "Error loading descriptor file: %s\n", upb_status_getstr(&status)); + fprintf(stderr, "Error loading descriptor file: %s\n", + upb_status_getstr(&status)); exit(1); } upb_status_uninit(&status); return s; } -static upb_flow_t upb_test_onvalue(void *closure, upb_value fval, upb_value val) { - (void)closure; +static upb_flow_t upb_test_onvalue(void *c, upb_value fval, upb_value val) { + (void)c; (void)fval; (void)val; return UPB_CONTINUE; @@ -56,6 +57,7 @@ static void test_upb_symtab() { upb_symtab_unref(s); const upb_msgdef *m = upb_downcast_msgdef_const(def); upb_msg_iter i = upb_msg_begin(m); + ASSERT(!upb_msg_done(i)); upb_fielddef *f = upb_msg_iter_field(i); ASSERT(upb_hassubdef(f)); upb_def *def2 = f->def; |