mirror of
https://github.com/gvx/bitser.git
synced 2024-11-11 01:44:21 +00:00
Fix sloppy errors (forgot to pass an argument, haserror -> has_error)
This commit is contained in:
parent
bf4425aac8
commit
0d0bb54405
@ -235,7 +235,7 @@ local function deserialize_value(buffer, seen)
|
||||
return v
|
||||
elseif t == 241 then
|
||||
--long resource
|
||||
local idx = reserve_seen()
|
||||
local idx = reserve_seen(seen)
|
||||
local value = resource_registry[deserialize_value(buffer, seen)]
|
||||
seen[idx] = value
|
||||
return value
|
||||
|
@ -149,9 +149,9 @@ describe("bitser", function()
|
||||
bitser.unregister("temp_resource_or_whatever")
|
||||
end)
|
||||
it("cannot serialize functions", function()
|
||||
assert.haserror(function() bitser.dumps(function() end) end, "cannot serialize type function")
|
||||
assert.has_error(function() bitser.dumps(function() end) end, "cannot serialize type function")
|
||||
end)
|
||||
it("cannot serialize unsupported class libraries without explicit deserializer", function()
|
||||
assert.haserror(function() bitser.registerClass('Horse', {mane = 'majestic'}) end, "no deserializer given for unsupported class library")
|
||||
assert.has_error(function() bitser.registerClass('Horse', {mane = 'majestic'}) end, "no deserializer given for unsupported class library")
|
||||
end)
|
||||
end)
|
Loading…
Reference in New Issue
Block a user