X-Git-Url: http://nitlanguage.org diff --git a/src/testing/testing_doc.nit b/src/testing/testing_doc.nit index b5b0f5d..6bd8f0b 100644 --- a/src/testing/testing_doc.nit +++ b/src/testing/testing_doc.nit @@ -291,10 +291,7 @@ private class NitunitDecorator redef fun add_code(v, block) do var code = block.raw_content - var meta = "nit" - if block isa BlockFence and block.meta != null then - meta = block.meta.to_s - end + var meta = block.meta or else "nit" # Do not try to test non-nit code. if meta != "nit" then return # Try to parse code blocks @@ -361,10 +358,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 == "core" then + 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.mproject.name).as(not null) + o = get_mmodule_by_name(nmodule, g, g.mpackage.name).as(not null) end ts.attr("package", mmodule.full_name)