diff --git a/test/app-tap/msgpackffi.test.lua b/test/app-tap/msgpackffi.test.lua index bb9826580a155e745cc5df5ded1993a74cb720c3..6f75fad9f0dac4163cc98bd8688a30acc61ec466 100755 --- a/test/app-tap/msgpackffi.test.lua +++ b/test/app-tap/msgpackffi.test.lua @@ -116,45 +116,6 @@ local function test_other(test, s) encode_max_depth = max_depth}) end --- gh-3926: Ensure that a returned pointer has the same cdata type --- as passed argument. -local function test_decode_buffer(test, s) - local cases = { - { - 'decode_unchecked(cdata<const char *>)', - data = ffi.cast('const char *', '\x93\x01\x02\x03'), - exp_res = {1, 2, 3}, - exp_rewind = 4, - }, - { - 'decode_unchecked(cdata<char *>)', - data = ffi.cast('char *', '\x93\x01\x02\x03'), - exp_res = {1, 2, 3}, - exp_rewind = 4, - }, - } - - test:plan(#cases) - - for _, case in ipairs(cases) do - test:test(case[1], function(test) - test:plan(4) - local res, res_buf = s.decode_unchecked(case.data) - test:is_deeply(res, case.exp_res, 'verify result') - local rewind = res_buf - case.data - test:is(rewind, case.exp_rewind, 'verify resulting buffer') - -- test:iscdata() is not sufficient here, because it - -- ignores 'const' qualifier (because of using - -- ffi.istype()). - test:is(type(res_buf), 'cdata', 'verify resulting buffer type') - local data_ctype = tostring(ffi.typeof(case.data)) - local res_buf_ctype = tostring(ffi.typeof(res_buf)) - test:is(res_buf_ctype, data_ctype, 'verify resulting buffer ctype') - end) - end -end - - tap.test("msgpackffi", function(test) local serializer = require('msgpackffi') test:plan(10)