parse_examples: count new on classes
authorAlexandre Terrasa <alexandre@moz-code.org>
Thu, 3 May 2018 15:20:36 +0000 (11:20 -0400)
committerAlexandre Terrasa <alexandre@moz-code.org>
Thu, 3 May 2018 15:20:36 +0000 (11:20 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

src/frontend/parse_examples.nit
src/frontend/tests/test_examples.sav/test_model_examples.res

index 945eb31..84c83a6 100644 (file)
@@ -118,6 +118,7 @@ redef class ANewExpr
        redef fun accept_example_visitor(v) do
                var recvtype = self.recvtype
                if recvtype != null then
+                       v.counter.inc recvtype.mclass
                        v.counter.inc recvtype.mclass.intro
                end
                visit_all(v)
index de733c8..8c49178 100644 (file)
@@ -1,6 +1,7 @@
 test_prog::game_examples provides example for:
  * test_prog::Game (4)
  * test_prog$Game (4)
+ * test_prog::List (2)
  * test_prog$List (2)
  * test_prog$Game$stop_game (1)
  * test_prog$Game$pause_game (1)
@@ -11,6 +12,7 @@ test_prog::game_examples provides example for:
 test_prog$MyGame provides example for:
  * test_prog::Game (4)
  * test_prog$Game (4)
+ * test_prog::List (2)
  * test_prog$List (2)
  * test_prog$Game$stop_game (1)
  * test_prog$Game$pause_game (1)
@@ -29,5 +31,7 @@ test_prog$MyGame$Game::stop_game provides example for:
  * test_prog::Game (1)
 test_prog$MyGame$_player_characters provides example for:
  * test_prog$List (1)
+ * test_prog::List (1)
 test_prog$MyGame$_computer_characters provides example for:
  * test_prog$List (1)
+ * test_prog::List (1)