mirror of
https://github.com/gvx/bitser.git
synced 2024-11-11 01:44:21 +00:00
Fix one of the tests
This commit is contained in:
parent
caf972ca80
commit
b7cc46f4bf
@ -302,7 +302,13 @@ describe("bitser", function()
|
|||||||
it("can read and write cdata", function()
|
it("can read and write cdata", function()
|
||||||
-- a simple value
|
-- a simple value
|
||||||
test_serdeser(ffi.new('double', 42.5))
|
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)
|
local type_of_struct = ffi.typeof(value)
|
||||||
-- with a registered type
|
-- with a registered type
|
||||||
bitser.register('struct_type', type_of_struct)
|
bitser.register('struct_type', type_of_struct)
|
||||||
|
Loading…
Reference in New Issue
Block a user