X-Git-Url: http://nitlanguage.org diff --git a/src/testing/testing_doc.nit b/src/testing/testing_doc.nit index 0f29d40..82518da 100644 --- a/src/testing/testing_doc.nit +++ b/src/testing/testing_doc.nit @@ -68,7 +68,6 @@ class NitUnitExecutor # Populate `blocks` from the markdown decorator mdproc.process(mdoc.content.join("\n")) - if blocks.is_empty then return toolcontext.check_errors @@ -77,11 +76,13 @@ class NitUnitExecutor var ne = new HTMLTag("failure") ne.attr("message", msg) tc.add ne + toolcontext.modelbuilder.unit_entities += 1 toolcontext.modelbuilder.failed_entities += 1 end if blocks.is_empty then testsuite.add(tc) end + if blocks.is_empty then return for block in blocks do docunits.add new DocUnit(mdoc, tc, block.write_to_string) end @@ -380,10 +381,10 @@ redef class ModelBuilder # 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) + if g != null and g.mpackage.name == "core" then + # except for a unit test in a module of `core` + # in this case, the whole `core` must be imported + o = get_mmodule_by_name(nmodule, g, g.mpackage.name).as(not null) end ts.attr("package", mmodule.full_name)