mirror of
https://github.com/gvx/bitser.git
synced 2024-11-11 01:44:21 +00:00
forgot to actually register the class i was testing
This commit is contained in:
parent
5d27470cce
commit
80c130ea8d
@ -315,6 +315,7 @@ end, register = function(name, resource)
|
||||
assert(not resource_registry[name], name .. " already registered")
|
||||
resource_registry[name] = resource
|
||||
resource_name_registry[resource] = name
|
||||
return resource
|
||||
end, unregister = function(name)
|
||||
resource_name_registry[resource_registry[name]] = nil
|
||||
resource_registry[name] = nil
|
||||
@ -355,6 +356,7 @@ end, registerClass = function(name, class, classkey, deserializer)
|
||||
classkey_registry[name] = classkey
|
||||
class_deserialize_registry[name] = deserializer
|
||||
class_name_registry[class] = name
|
||||
return class
|
||||
end, unregisterClass = function(name)
|
||||
class_name_registry[class_registry[name]] = nil
|
||||
classkey_registry[name] = nil
|
||||
|
@ -84,7 +84,7 @@ describe("bitser", function()
|
||||
end)
|
||||
it("serializes MiddleClass instances", function()
|
||||
local class = require("middleclass")
|
||||
local Horse = class('Horse')
|
||||
local Horse = bitser.registerClass(class('Horse'))
|
||||
function Horse:initialize(name)
|
||||
self.name = name
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user