2021-01-02 13:31:18 -05:00
|
|
|
|
|
|
|
|
local ut = {}
|
|
|
|
|
|
|
|
|
|
function ut.globaldb()
|
2021-01-12 14:14:38 -05:00
|
|
|
globaldb.enable()
|
2021-01-02 13:31:18 -05:00
|
|
|
local g1a = global("unittest-g1")
|
|
|
|
|
local g2a = global("unittest-g2")
|
|
|
|
|
local g1b = global("unittest-g1")
|
|
|
|
|
local g2b = global("unittest-g2")
|
|
|
|
|
assert(g1a == g1b)
|
|
|
|
|
assert(g2a == g2b)
|
|
|
|
|
assert(g1a.__global == "unittest-g1")
|
|
|
|
|
assert(g2a.__global == "unittest-g2")
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
rununittests(ut)
|