From b7cc46f4bf81545db3eda639a65bc14cbf630496 Mon Sep 17 00:00:00 2001 From: "R.E.J. Wellner" Date: Tue, 28 Apr 2020 16:56:11 +0200 Subject: [PATCH] Fix one of the tests --- spec/bitser_spec.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/spec/bitser_spec.lua b/spec/bitser_spec.lua index 23874ef..92a184e 100644 --- a/spec/bitser_spec.lua +++ b/spec/bitser_spec.lua @@ -302,7 +302,13 @@ describe("bitser", function() it("can read and write cdata", function() -- a simple value test_serdeser(ffi.new('double', 42.5)) - local value = ffi.new('struct some_struct { int a; double b; }', 42, 1.25) + ffi.cdef[[ + struct some_struct { + int a; + double b; + }; + ]] + local value = ffi.new('struct some_struct', 42, 1.25) local type_of_struct = ffi.typeof(value) -- with a registered type bitser.register('struct_type', type_of_struct)