summaryrefslogtreecommitdiff
path: root/test/test-lace.engine.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/test-lace.engine.lua')
-rw-r--r--test/test-lace.engine.lua11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/test-lace.engine.lua b/test/test-lace.engine.lua
index 8cdd3ea..f8faaf8 100644
--- a/test/test-lace.engine.lua
+++ b/test/test-lace.engine.lua
@@ -15,6 +15,13 @@ local lace = require 'lace'
local testnames = {}
+local real_assert = assert
+local total_asserts = 0
+local function assert(...)
+ real_assert(...)
+ total_asserts = total_asserts + 1
+end
+
local function add_test(suite, name, value)
rawset(suite, name, value)
testnames[#testnames+1] = name
@@ -109,7 +116,7 @@ local comp_context = {
end
local fh = io.open("test/test-lace.engine-" .. name .. ".rules", "r")
if not fh then
- return compiler.error("LOADER: Unknown: " .. name, {1})
+ return lace.error.error("LOADER: Unknown: " .. name, {1})
end
local content = fh:read("*a")
fh:close()
@@ -211,6 +218,6 @@ for _, testname in ipairs(testnames) do
end
end
-print(tostring(count_ok) .. "/" .. tostring(#testnames) .. " OK")
+print(tostring(count_ok) .. "/" .. tostring(#testnames) .. " [" .. tostring(total_asserts) .. "] OK")
os.exit(count_ok == #testnames and 0 or 1)