From d75197375876538332d6d81aa4e8edd13b8f26c1 Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Tue, 5 Jan 2010 17:42:05 -0800 Subject: Ported/fixed tests to new data types. --- tests/tests.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/tests.c') diff --git a/tests/tests.c b/tests/tests.c index 9479e82..cd7a4f0 100644 --- a/tests/tests.c +++ b/tests/tests.c @@ -230,8 +230,8 @@ static void test_get_f_uint32_t() static void test_upb_symtab() { struct upb_symtab *s = upb_symtab_new(); ASSERT(s); - upb_string *descriptor = upb_strreadfile("tests/test.proto.pb"); - if(!descriptor) { + upb_strptr descriptor = upb_strreadfile("tests/test.proto.pb"); + if(upb_string_isnull(descriptor)) { fprintf(stderr, "Couldn't read input file tests/test.proto.pb\n"); exit(1); } @@ -242,7 +242,7 @@ static void test_upb_symtab() { // Test cycle detection by making a cyclic def's main refcount go to zero // and then be incremented to one again. - upb_string *symname = upb_strdupc("A"); + upb_strptr symname = upb_strdupc("A"); struct upb_def *def = upb_symtab_lookup(s, symname); upb_string_unref(symname); ASSERT(def); -- cgit v1.2.3