diff options
author | Joshua Haberman <joshua@reverberate.org> | 2009-12-05 10:32:53 -0800 |
---|---|---|
committer | Joshua Haberman <joshua@reverberate.org> | 2009-12-05 10:32:53 -0800 |
commit | 18291eedc3cb6bf4386698620ad9d02ad367126a (patch) | |
tree | 4096201b5a9e8c57605f145be8927e757cb23385 /tests/tests.c | |
parent | a95ab58e79c50b0927eae2b834d3de20a8effc36 (diff) |
Make defs refcounted, rename upb_context->upbsymtab.
There is currently a memory leak when type definitions
form cycles. This will need to be dealt with.
Diffstat (limited to 'tests/tests.c')
-rw-r--r-- | tests/tests.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/tests.c b/tests/tests.c index ddf6d6f..9fbfa3a 100644 --- a/tests/tests.c +++ b/tests/tests.c @@ -4,7 +4,7 @@ #include <stdio.h> #include <stdlib.h> #include "upb_parse.c" -#include "upb_context.h" +#include "upb_def.h" int num_assertions = 0; #define ASSERT(expr) do { \ @@ -227,10 +227,10 @@ static void test_get_f_uint32_t() #undef TEST } -static void test_upb_context() { - struct upb_context *c = upb_context_new(); +static void test_upb_symtab() { + struct upb_symtab *c = upb_symtab_new(); ASSERT(c); - upb_context_unref(c); + upb_symtab_unref(c); } @@ -247,7 +247,7 @@ int main() TEST(test_get_v_uint32_t); TEST(test_skip_v_uint64_t); TEST(test_get_f_uint32_t); - TEST(test_upb_context); + TEST(test_upb_symtab); printf("All tests passed (%d assertions).\n", num_assertions); return 0; } |