forgot to actually register the class i was testing

This commit is contained in:
Robin Wellner 2016-02-15 14:39:41 +01:00
parent 5d27470cce
commit 80c130ea8d
2 changed files with 3 additions and 1 deletions

View File

@ -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

View File

@ -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