From 693b841ec6e2bdb91920b7ea35a70ca30b416741 Mon Sep 17 00:00:00 2001 From: Josh Haberman Date: Mon, 23 Jan 2017 16:06:26 -0800 Subject: Removed all code for adding extensions to upb_symtab. This means extensions can't be used until we implement the replacement APIs for accessing extensions from a symtab. --- tests/bindings/lua/test_upb.lua | 36 ------------------------------------ 1 file changed, 36 deletions(-) (limited to 'tests/bindings/lua') diff --git a/tests/bindings/lua/test_upb.lua b/tests/bindings/lua/test_upb.lua index 261328d..1dc0717 100644 --- a/tests/bindings/lua/test_upb.lua +++ b/tests/bindings/lua/test_upb.lua @@ -403,42 +403,6 @@ function test_symtab() assert_equal(msgdef3:field("field5"):subdef(), msgdef2) end -function test_symtab_add_extension() - -- Adding an extension at the same time as the extendee. - local symtab = upb.SymbolTable{ - upb.MessageDef{full_name = "M1"}, - upb.FieldDef{name = "extension1", is_extension = true, number = 1, - type = upb.TYPE_INT32, containing_type_name = "M1"} - } - - local m1 = symtab:lookup("M1") - assert_not_nil(m1) - assert_equal(1, #m1) - - local f1 = m1:field("extension1") - assert_not_nil(f1) - assert_true(f1:is_extension()) - assert_true(f1:is_frozen()) - assert_equal(1, f1:number()) - - -- Adding an extension to an existing extendee. - symtab:add{ - upb.FieldDef{name = "extension2", is_extension = true, number = 2, - type = upb.TYPE_INT32, containing_type_name = "M1"} - } - - local m1_2 = symtab:lookup("M1") - assert_not_nil(m1_2) - assert_true(m1 ~= m1_2) - assert_equal(2, #m1_2) - - local f2 = m1_2:field("extension2") - assert_not_nil(f2) - assert_true(f2:is_extension()) - assert_true(f2:is_frozen()) - assert_equal(2, f2:number()) -end - function test_numeric_array() local function test_for_numeric_type(upb_type, val, too_big, too_small, bad3) local array = upb.Array(upb_type) -- cgit v1.2.3