Module:Wd/sandbox/testcases/common
Appearance
local p = {}
-- generates unit test object to be returned by a specific testcase module
-- first argument: name of the module to test
-- second argument: a table with the structure described in testcaseTable; used for reference values
function p.generate_unit_tests_object_module_vs_table(module_to_test, correct_outputs)
local unit_tests_module = require("Module:UnitTests")
function unit_tests_module:test()
unit_tests_module:preprocess_equals_many(
"{{#invoke:" .. module_to_test .. "|",
"}}",
correct_outputs
)
end
return unit_tests_module
end
-- for testing a module against a module
-- TODO
function p.generate_unit_tests_object_module_vs_module()
end
return p