fun gen_unit(mmodule: MModule, test_file: String): Template do
var with_private = toolcontext.opt_gen_private.value
var tpl = new Template
- tpl.addn "module test_{mmodule.name} is test_suite"
+ tpl.addn "module test_{mmodule.name} is test"
tpl.addn ""
- tpl.addn "import test_suite"
if with_private then
tpl.addn "intrude import {mmodule.name}"
else
if mclassdef.mclass.kind != concrete_kind then continue
tpl.addn ""
tpl.addn "class Test{mclassdef.name}"
- tpl.addn "\tsuper TestSuite"
+ tpl.addn "\ttest"
for mpropdef in mclassdef.mpropdefs do
if not mpropdef isa MMethodDef then continue
var mproperty = mpropdef.mproperty
if not with_private and mproperty.visibility <= protected_visibility then continue
var case_name = case_name(mpropdef)
tpl.addn ""
- tpl.addn "\tfun {case_name} do"
+ tpl.addn "\tfun {case_name} is test do"
tpl.addn "\t\tassert not_implemented: false # TODO remove once implemented"
tpl.addn ""
tpl.addn gen_init(mclassdef)
-module test_test_nitunit is test_suite
+module test_test_nitunit is test
-import test_suite
import test_nitunit
class TestX
- super TestSuite
+ test
- fun test_foo do
+ fun test_foo is test do
assert not_implemented: false # TODO remove once implemented
var subject: X
subject.foo
end
- fun test_foo1 do
+ fun test_foo1 is test do
assert not_implemented: false # TODO remove once implemented
var subject: X
subject.foo1(a, b)
end
- fun test_foo3 do
+ fun test_foo3 is test do
assert not_implemented: false # TODO remove once implemented
var subject: X
end
class TestY
- super TestSuite
+ test
- fun test_bra do
+ fun test_bra is test do
assert not_implemented: false # TODO remove once implemented
var subject: Y[X]
assert exp == res
end
- fun test_bra_assign do
+ fun test_bra_assign is test do
assert not_implemented: false # TODO remove once implemented
var subject: Y[X]
subject[e] = i
end
- fun test_plus do
+ fun test_plus is test do
assert not_implemented: false # TODO remove once implemented
var subject: Y[X]
assert exp == res
end
- fun test_minus do
+ fun test_minus is test do
assert not_implemented: false # TODO remove once implemented
var subject: Y[X]
assert exp == res
end
- fun test_star do
+ fun test_star is test do
assert not_implemented: false # TODO remove once implemented
var subject: Y[X]
assert exp == res
end
- fun test_slash do
+ fun test_slash is test do
assert not_implemented: false # TODO remove once implemented
var subject: Y[X]
assert exp == res
end
- fun test_percent do
+ fun test_percent is test do
assert not_implemented: false # TODO remove once implemented
var subject: Y[X]
assert exp == res
end
- fun test_unary_minus do
+ fun test_unary_minus is test do
assert not_implemented: false # TODO remove once implemented
var subject: Y[X]
assert exp == res
end
- fun test_equals do
+ fun test_equals is test do
assert not_implemented: false # TODO remove once implemented
var subject: Y[X]
assert exp == res
end
- fun test_not_equals do
+ fun test_not_equals is test do
assert not_implemented: false # TODO remove once implemented
var subject: Y[X]
assert exp == res
end
- fun test_lt do
+ fun test_lt is test do
assert not_implemented: false # TODO remove once implemented
var subject: Y[X]
assert exp == res
end
- fun test_le do
+ fun test_le is test do
assert not_implemented: false # TODO remove once implemented
var subject: Y[X]
assert exp == res
end
- fun test_compare do
+ fun test_compare is test do
assert not_implemented: false # TODO remove once implemented
var subject: Y[X]
assert exp == res
end
- fun test_ge do
+ fun test_ge is test do
assert not_implemented: false # TODO remove once implemented
var subject: Y[X]
assert exp == res
end
- fun test_gt do
+ fun test_gt is test do
assert not_implemented: false # TODO remove once implemented
var subject: Y[X]
end
class TestZ
- super TestSuite
+ test
- fun test_bra do
+ fun test_bra is test do
assert not_implemented: false # TODO remove once implemented
var subject: Z
assert exp == res
end
- fun test_bra_assign do
+ fun test_bra_assign is test do
assert not_implemented: false # TODO remove once implemented
var subject: Z
subject[i, j] = k
end
- fun test_foo= do
+ fun test_foo= is test do
assert not_implemented: false # TODO remove once implemented
var subject: Z
subject.foo(i) = j
end
- fun test_bar= do
+ fun test_bar= is test do
assert not_implemented: false # TODO remove once implemented
var subject: Z
-module test_test_nitunit is test_suite
+module test_test_nitunit is test
-import test_suite
intrude import test_nitunit
class TestX
- super TestSuite
+ test
- fun test_foo do
+ fun test_foo is test do
assert not_implemented: false # TODO remove once implemented
var subject: X
subject.foo
end
- fun test_foo1 do
+ fun test_foo1 is test do
assert not_implemented: false # TODO remove once implemented
var subject: X
subject.foo1(a, b)
end
- fun test_foo2 do
+ fun test_foo2 is test do
assert not_implemented: false # TODO remove once implemented
var subject: X
assert exp == res
end
- fun test_foo3 do
+ fun test_foo3 is test do
assert not_implemented: false # TODO remove once implemented
var subject: X
assert exp == res
end
- fun test_foo3= do
+ fun test_foo3= is test do
assert not_implemented: false # TODO remove once implemented
var subject: X
end
class TestY
- super TestSuite
+ test
- fun test_bra do
+ fun test_bra is test do
assert not_implemented: false # TODO remove once implemented
var subject: Y[X]
assert exp == res
end
- fun test_bra_assign do
+ fun test_bra_assign is test do
assert not_implemented: false # TODO remove once implemented
var subject: Y[X]
subject[e] = i
end
- fun test_plus do
+ fun test_plus is test do
assert not_implemented: false # TODO remove once implemented
var subject: Y[X]
assert exp == res
end
- fun test_minus do
+ fun test_minus is test do
assert not_implemented: false # TODO remove once implemented
var subject: Y[X]
assert exp == res
end
- fun test_star do
+ fun test_star is test do
assert not_implemented: false # TODO remove once implemented
var subject: Y[X]
assert exp == res
end
- fun test_slash do
+ fun test_slash is test do
assert not_implemented: false # TODO remove once implemented
var subject: Y[X]
assert exp == res
end
- fun test_percent do
+ fun test_percent is test do
assert not_implemented: false # TODO remove once implemented
var subject: Y[X]
assert exp == res
end
- fun test_unary_minus do
+ fun test_unary_minus is test do
assert not_implemented: false # TODO remove once implemented
var subject: Y[X]
assert exp == res
end
- fun test_equals do
+ fun test_equals is test do
assert not_implemented: false # TODO remove once implemented
var subject: Y[X]
assert exp == res
end
- fun test_not_equals do
+ fun test_not_equals is test do
assert not_implemented: false # TODO remove once implemented
var subject: Y[X]
assert exp == res
end
- fun test_lt do
+ fun test_lt is test do
assert not_implemented: false # TODO remove once implemented
var subject: Y[X]
assert exp == res
end
- fun test_le do
+ fun test_le is test do
assert not_implemented: false # TODO remove once implemented
var subject: Y[X]
assert exp == res
end
- fun test_compare do
+ fun test_compare is test do
assert not_implemented: false # TODO remove once implemented
var subject: Y[X]
assert exp == res
end
- fun test_ge do
+ fun test_ge is test do
assert not_implemented: false # TODO remove once implemented
var subject: Y[X]
assert exp == res
end
- fun test_gt do
+ fun test_gt is test do
assert not_implemented: false # TODO remove once implemented
var subject: Y[X]
end
class TestZ
- super TestSuite
+ test
- fun test_bra do
+ fun test_bra is test do
assert not_implemented: false # TODO remove once implemented
var subject: Z
assert exp == res
end
- fun test_bra_assign do
+ fun test_bra_assign is test do
assert not_implemented: false # TODO remove once implemented
var subject: Z
subject[i, j] = k
end
- fun test_foo= do
+ fun test_foo= is test do
assert not_implemented: false # TODO remove once implemented
var subject: Z
subject.foo(i) = j
end
- fun test_bar= do
+ fun test_bar= is test do
assert not_implemented: false # TODO remove once implemented
var subject: Z