Commit 407b8da2 authored by Jamie A. Jennings's avatar Jamie A. Jennings

More refactoring. unittest.lua is slowly becoming understandable, but there...

More refactoring.  unittest.lua is slowly becoming understandable, but there is a ways yet to go.  For example, the print statements are still scattered all over, and the different kinds of tests are still in one big switch statement.
parent e1d8c2ed
......@@ -129,12 +129,12 @@ local function run(args)
cli_test = assert(rosie.import("unittest"), "failed to open unittest package")
-- FUTURE: handle versions like "1.2.3" ==> "rpl_1_2.rpl"
local rpl_definition_file = "rpl_" .. tostring(en.compiler.version):gsub("%.", "_")
cli_test.setup(en, "rosie/" .. rpl_definition_file)
local test_rplx = cli_test.setup(en, "rosie/" .. rpl_definition_file)
local total_errors, total_failures, total_blocked = 0, 0, 0
local total_passed, total_tests = 0, 0
local total_files, total_compiled = 0, 0
for _, fn in ipairs(args.filenames) do
local ok, errors, failures, blocked, passed, total = cli_test.run(rosie, en, args, fn)
local ok, errors, failures, blocked, passed, total = cli_test.run(rosie, test_rplx, args, fn)
total_files = total_files + 1
if ok then total_compiled = total_compiled + 1; end
total_errors = total_errors + (errors or 0)
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment