Improve error reporting.

This commit is contained in:
James Roseborough
2007-12-06 15:29:49 +00:00
parent 8f581c8f07
commit 644896c467
16 changed files with 208 additions and 80 deletions

14
src/test/res/ids.lua Normal file
View File

@@ -0,0 +1,14 @@
-- utility to give tables and functions uniform ids for testing
ids = {}
function id(obj)
if not obj or type(obj) == 'number' or type(obj) == 'string' or type(obj) == 'boolean' then
return obj
end
local v = ids[obj]
if v then
return v
end
table.insert(ids,obj)
ids[obj] = type(obj)..'.'..tostring(#ids)
return ids[obj]
end