I hope it'll recognise the global now...

This commit is contained in:
Robin Wellner 2016-02-23 14:37:22 +01:00
parent 95e58fb654
commit d6ac0e2636

View File

@ -1,14 +1,5 @@
local bitser = require 'bitser'
local ffi = require 'ffi'
local function serdeser(value)
return bitser.loads(bitser.dumps(value))
end
local function test_serdeser(value)
assert.are.same(serdeser(value), value)
end
love = {filesystem = {newFileData = function()
return {getPointer = function()
local buf = ffi.new("uint8_t[?]", #love.s)
@ -17,10 +8,20 @@ love = {filesystem = {newFileData = function()
end, getSize = function()
return #love.s
end}
end, write = function(s)
end, write = function(fname, s)
love.s = s
end}}
local bitser = require 'bitser'
local function serdeser(value)
return bitser.loads(bitser.dumps(value))
end
local function test_serdeser(value)
assert.are.same(serdeser(value), value)
end
describe("bitser", function()
it("serializes simple values", function()
test_serdeser(true)