cpt += 1
var file = "{prefix}{cpt}.nit"
- toolcontext.info("Execute {tc.attrs["classname"]}.{tc.attrs["name"]} in {file}", 1)
+ toolcontext.info("Execute {tc.attrs["name"]} in {file}", 1)
var dir = file.dirname
if dir != "" then dir.mkdir
if toolcontext.opt_noact.value then return
var nit_dir = toolcontext.nit_dir
- var nitg = "{nit_dir}/bin/nitg"
+ var nitg = "{nit_dir or else ""}/bin/nitg"
if nit_dir == null or not nitg.file_exists then
toolcontext.error(null, "Cannot find nitg. Set envvar NIT_DIR.")
toolcontext.check_errors
var nmodule = mmodule2nmodule[mmodule]
assert nmodule != null
- # what module to import in the unit test.
- # try to detect the main module of the project
- # TODO do things correctly once the importation of arbitraty nested module is legal
+ # usualy, only the original module must be imported in the unit test.
var o = mmodule
var g = o.mgroup
if g != null and g.mproject.name == "standard" then
+ # except for a unit test in a module of standard
+ # in this case, the whole standard must be imported
o = get_mmodule_by_name(nmodule, g, g.mproject.name).as(not null)
end