A variety of small fixes

This commit is contained in:
2021-07-09 13:52:03 -04:00
parent 496190d5cf
commit dba5bccfa0
4 changed files with 12 additions and 44 deletions

View File

@@ -35,9 +35,6 @@ local tostring = tostring
inspect.KEY = {}
inspect.METATABLE = {}
local function rawpairs(t)
return table.unsafepairs(t)
end
-- Apostrophizes the string if it has quotes, but not aphostrophes
-- Otherwise, it returns a regular quoted string

View File

@@ -1,6 +1,13 @@
makeclass("unittests")
function cmt()
for i=1,100000 do
local t = {1,2,3,4,5,a=1,b=2,c=3,d=4,e=5}
table.clear(t)
end
end
function unittests.tables()
-- check table.count
assert(table.count({}) == 0)