frontend: remove ModelView dependency
authorAlexandre Terrasa <alexandre@moz-code.org>
Tue, 15 May 2018 01:49:53 +0000 (21:49 -0400)
committerAlexandre Terrasa <alexandre@moz-code.org>
Wed, 30 May 2018 14:53:16 +0000 (10:53 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

src/frontend/tests/test_examples.nit

index fbd4803..0153653 100644 (file)
@@ -16,7 +16,7 @@ module test_examples is test
 
 import frontend
 import parse_examples
-import model_views
+import model_collect
 
 class TestExample
        test
@@ -42,13 +42,9 @@ class TestExample
                # process
                modelbuilder.run_phases
                toolcontext.run_global_phases(mmodules)
-               var mainmodule = toolcontext.make_main_module(mmodules)
 
                var filters = new ModelFilter(accept_example = true)
-
-               var view = new ModelView(model, mainmodule, filters)
-
-               for mentity in view.mentities do
+               for mentity in model.collect_mentities(filters) do
                        if not mentity.is_example then continue
 
                        var mexample = mentity.mexample