Lots of work on removing malloc from driver
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
makeclass("unittests")
|
||||
|
||||
function unittests.globaldb()
|
||||
local g1a = global("unittest-g1")
|
||||
local g2a = global("unittest-g2")
|
||||
local g1b = global("unittest-g1")
|
||||
local g2b = global("unittest-g2")
|
||||
local g1a = global.table("unittest-g1")
|
||||
local g2a = global.table("unittest-g2")
|
||||
local g1b = global.table("unittest-g1")
|
||||
local g2b = global.table("unittest-g2")
|
||||
assert(g1a == g1b)
|
||||
assert(g2a == g2b)
|
||||
assert(g1a.__global == "unittest-g1")
|
||||
|
||||
@@ -52,9 +52,9 @@ function unittests.diffcompare()
|
||||
assert(tdc({}, {a=_G}, {}, {}) == "a=globals;")
|
||||
|
||||
-- GlobalDB tables should be forced to NIL.
|
||||
assert(tdc({}, {a=global("foo")}, {}, {a=global("foo")}) == "a=nil;");
|
||||
assert(tdc({}, {}, {}, {a=global("foo")}) == "a=nil;");
|
||||
assert(tdc({}, {a=global("foo")}, {}, {}) == "");
|
||||
assert(tdc({}, {a=global.table("foo")}, {}, {a=global.table("foo")}) == "a=nil;");
|
||||
assert(tdc({}, {}, {}, {a=global.table("foo")}) == "a=nil;");
|
||||
assert(tdc({}, {a=global.table("foo")}, {}, {}) == "");
|
||||
|
||||
-- Set up some numbered tables for tests involving such.
|
||||
local mtab10 = {}
|
||||
@@ -118,7 +118,7 @@ function unittests.diffapply()
|
||||
|
||||
-- GlobalDB tables should be forced to NIL.
|
||||
rtab={a=3}
|
||||
assert(not tda({}, {a=global("foo")}, rtab))
|
||||
assert(not tda({}, {a=global.table("foo")}, rtab))
|
||||
assert(rtab.a == nil)
|
||||
|
||||
-- Unnumbered tables should be forced to NIL.
|
||||
|
||||
Reference in New Issue
Block a user