if not case_match_pattern(mpropdef) then continue
toolcontext.modelbuilder.total_tests += 1
var test = new TestCase(suite, mpropdef, toolcontext)
- suite.add_test test
+ suite.test_cases.add test
end
end
# method to execute after all tests in the module
# List of `TestCase` to be executed in this suite.
var test_cases = new Array[TestCase]
- # Add a `TestCase` to the suite.
- fun add_test(case: TestCase) do test_cases.add case
-
# Test to be executed before the whole test suite.
var before_module: nullable TestCase = null
end
redef class MMethodDef
- # TODO use annotations?
-
- # Is the method a test_method?
- # i.e. begins with "test_"
- private fun is_test: Bool do return name.has_prefix("test_")
-
# Is the method a "before_module"?
private fun is_before_module: Bool do return name == "before_module"