tests: fix tests for doc commands
authorAlexandre Terrasa <alexandre@moz-code.org>
Tue, 21 Nov 2017 22:10:17 +0000 (17:10 -0500)
committerAlexandre Terrasa <alexandre@moz-code.org>
Tue, 28 Nov 2017 20:11:07 +0000 (15:11 -0500)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

13 files changed:
src/doc/commands/tests/test_commands_json.sav/test_cmd_mentities.res
src/doc/commands/tests/test_commands_json.sav/test_cmd_search.res
src/doc/commands/tests/test_commands_model.nit
src/doc/commands/tests/test_commands_parser.nit
src/model/model_collect.nit
src/model/test_model_json.sav/test_classdefs_to_full_json.res
src/model/test_model_json.sav/test_classes_to_full_json.res
src/model/test_model_json.sav/test_groups_to_full_json.res
src/model/test_model_json.sav/test_modules_to_full_json.res
src/model/test_model_json.sav/test_packages_to_full_json.res
src/model/test_model_json.sav/test_propdefs_to_full_json.res
src/model/test_model_json.sav/test_props_to_full_json.res
src/model/test_model_json.sav/test_refs_to_full_json.res

index 6a09f6b..866e31f 100644 (file)
                        "file": "test_location"
                }
        }, {
+               "name": "game_examples",
+               "class_name": "MModule",
+               "full_name": "test_prog::game_examples",
+               "mdoc": null,
+               "visibility": "public",
+               "modifiers": ["module"],
+               "location": {
+                       "column_end": 3,
+                       "column_start": 1,
+                       "line_end": 32,
+                       "line_start": 15,
+                       "file": "test_location"
+               }
+       }, {
                "name": "platform",
                "class_name": "MModule",
                "full_name": "test_prog::platform",
index 95bf855..d84a73b 100644 (file)
                }
        }],
        "page": 1,
-       "count": 106,
+       "count": 113,
        "limit": 10,
-       "max": 10
+       "max": 11
 }
index 9cdfc96..246d882 100644 (file)
@@ -169,7 +169,7 @@ class TestCommandsModel
                var cmd = new CmdModelEntities(test_view, kind = "modules")
                var res = cmd.init_command
                assert res isa CmdSuccess
-               assert cmd.results.as(not null).length == 9
+               assert cmd.results.as(not null).length == 10
        end
 
        fun test_cmd_results_random is test do
index e58a157..1a18188 100644 (file)
@@ -71,7 +71,7 @@ class TestCommandsParser
                var cmd = parser.parse("descendants: Object")
                assert cmd isa CmdDescendants
                assert parser.error == null
-               assert cmd.results.as(not null).length == 19
+               assert cmd.results.as(not null).length == 20
        end
 
        fun test_cmd_parser_descendants_without_children is test do
@@ -79,8 +79,7 @@ class TestCommandsParser
                var cmd = parser.parse("descendants: Object | children: false")
                assert cmd isa CmdDescendants
                assert parser.error == null
-               print cmd.results.as(not null)
-               assert cmd.results.as(not null).length == 7
+               assert cmd.results.as(not null).length == 8
        end
 
        # CmdSearch
index 61d03a0..8da799a 100644 (file)
@@ -568,6 +568,7 @@ redef class MClass
        # This method uses a flattened hierarchy containing all the mclassdefs.
        redef fun collect_parents(view) do
                var res = new HashSet[MENTITY]
+               if not view.mainmodule.flatten_mclass_hierarchy.has(self) then return res
                for mclass in in_hierarchy(view.mainmodule).direct_greaters do
                        if mclass == self or not view.accept_mentity(mclass) then continue
                        res.add mclass
@@ -580,6 +581,7 @@ redef class MClass
        # This method uses a flattened hierarchy containing all the mclassdefs.
        redef fun collect_children(view) do
                var res = new HashSet[MENTITY]
+               if not view.mainmodule.flatten_mclass_hierarchy.has(self) then return res
                for mclass in in_hierarchy(view.mainmodule).direct_smallers do
                        if mclass == self or not view.accept_mentity(mclass) then continue
                        res.add mclass
index 96d1691..bf731cd 100644 (file)
        "redef_mpropdefs": []
 }
 {
+       "name": "MyGame",
+       "class_name": "MClassDef",
+       "full_name": "test_prog$MyGame",
+       "mdoc": {
+               "content": "This is an example of how to implement the Game interface",
+               "location": {
+                       "column_end": 0,
+                       "column_start": 1,
+                       "line_end": 20,
+                       "line_start": 19,
+                       "file": "test_location"
+               }
+       },
+       "visibility": "public",
+       "modifiers": ["public", "class"],
+       "location": {
+               "column_end": 3,
+               "column_start": 1,
+               "line_end": 32,
+               "line_start": 19,
+               "file": "test_location"
+       },
+       "is_intro": true,
+       "mparameters": [],
+       "mmodule": {
+               "full_name": "test_prog::game_examples"
+       },
+       "mclass": {
+               "full_name": "test_prog::MyGame"
+       },
+       "mpropdefs": [{
+               "full_name": "test_prog$MyGame$_computer_characters"
+       }, {
+               "full_name": "test_prog$MyGame$_player_characters"
+       }, {
+               "full_name": "test_prog$MyGame$Game::computer_characters"
+       }, {
+               "full_name": "test_prog$MyGame$computer_characters="
+       }, {
+               "full_name": "test_prog$MyGame$Game::pause_game"
+       }, {
+               "full_name": "test_prog$MyGame$Game::player_characters"
+       }, {
+               "full_name": "test_prog$MyGame$player_characters="
+       }, {
+               "full_name": "test_prog$MyGame$Game::start_game"
+       }, {
+               "full_name": "test_prog$MyGame$Game::stop_game"
+       }],
+       "intro_mproperties": [{
+               "full_name": "test_prog::game_examples::MyGame::_computer_characters"
+       }, {
+               "full_name": "test_prog::game_examples::MyGame::_player_characters"
+       }, {
+               "full_name": "test_prog::MyGame::computer_characters="
+       }, {
+               "full_name": "test_prog::MyGame::player_characters="
+       }],
+       "intro": {
+               "full_name": "test_prog$MyGame"
+       },
+       "mpackage": {
+               "full_name": "test_prog"
+       },
+       "intro_mpropdefs": [{
+               "full_name": "test_prog$MyGame$_computer_characters"
+       }, {
+               "full_name": "test_prog$MyGame$_player_characters"
+       }, {
+               "full_name": "test_prog$MyGame$computer_characters="
+       }, {
+               "full_name": "test_prog$MyGame$player_characters="
+       }],
+       "redef_mpropdefs": [{
+               "full_name": "test_prog$MyGame$Game::computer_characters"
+       }, {
+               "full_name": "test_prog$MyGame$Game::pause_game"
+       }, {
+               "full_name": "test_prog$MyGame$Game::player_characters"
+       }, {
+               "full_name": "test_prog$MyGame$Game::start_game"
+       }, {
+               "full_name": "test_prog$MyGame$Game::stop_game"
+       }]
+}
+{
        "name": "Starter",
        "class_name": "MClassDef",
        "full_name": "test_prog$Starter",
index 19495e1..dc7f14b 100644 (file)
        }]
 }
 {
+       "name": "MyGame",
+       "class_name": "MClass",
+       "full_name": "test_prog::MyGame",
+       "mdoc": {
+               "content": "This is an example of how to implement the Game interface",
+               "location": {
+                       "column_end": 0,
+                       "column_start": 1,
+                       "line_end": 20,
+                       "line_start": 19,
+                       "file": "test_location"
+               }
+       },
+       "visibility": "public",
+       "modifiers": ["public", "class"],
+       "location": {
+               "column_end": 3,
+               "column_start": 1,
+               "line_end": 32,
+               "line_start": 19,
+               "file": "test_location"
+       },
+       "mparameters": [],
+       "intro": {
+               "full_name": "test_prog$MyGame"
+       },
+       "intro_mmodule": {
+               "full_name": "test_prog::game_examples"
+       },
+       "mpackage": {
+               "full_name": "test_prog"
+       },
+       "mclassdefs": [{
+               "full_name": "test_prog$MyGame"
+       }],
+       "all_mproperties": [{
+               "full_name": "test_prog::game_examples::MyGame::_computer_characters"
+       }, {
+               "full_name": "test_prog::game_examples::MyGame::_player_characters"
+       }, {
+               "full_name": "test_prog::Game::computer_characters"
+       }, {
+               "full_name": "test_prog::MyGame::computer_characters="
+       }, {
+               "full_name": "test_prog::Game::pause_game"
+       }, {
+               "full_name": "test_prog::Game::player_characters"
+       }, {
+               "full_name": "test_prog::MyGame::player_characters="
+       }, {
+               "full_name": "test_prog::Game::start_game"
+       }, {
+               "full_name": "test_prog::Game::stop_game"
+       }],
+       "intro_mproperties": [{
+               "full_name": "test_prog::game_examples::MyGame::_computer_characters"
+       }, {
+               "full_name": "test_prog::game_examples::MyGame::_player_characters"
+       }, {
+               "full_name": "test_prog::MyGame::computer_characters="
+       }, {
+               "full_name": "test_prog::MyGame::player_characters="
+       }],
+       "redef_mproperties": [{
+               "full_name": "test_prog::Game::computer_characters"
+       }, {
+               "full_name": "test_prog::Game::pause_game"
+       }, {
+               "full_name": "test_prog::Game::player_characters"
+       }, {
+               "full_name": "test_prog::Game::start_game"
+       }, {
+               "full_name": "test_prog::Game::stop_game"
+       }],
+       "parents": []
+}
+{
        "name": "Starter",
        "class_name": "MClass",
        "full_name": "test_prog::Starter",
index 3e9fd9f..ee5e331 100644 (file)
@@ -33,6 +33,8 @@
                "full_name": "test_prog::test_prog"
        }],
        "mgroups": [{
+               "full_name": "test_prog>examples>"
+       }, {
                "full_name": "test_prog>game>"
        }, {
                "full_name": "test_prog>platform>"
        }]
 }
 {
+       "name": "examples",
+       "class_name": "MGroup",
+       "full_name": "test_prog>examples>",
+       "mdoc": null,
+       "visibility": "public",
+       "modifiers": ["group"],
+       "location": {
+               "column_end": 0,
+               "column_start": 0,
+               "line_end": 0,
+               "line_start": 0,
+               "file": "test_location"
+       },
+       "is_root": false,
+       "mpackage": {
+               "full_name": "test_prog"
+       },
+       "default_mmodule": null,
+       "parent": {
+               "full_name": "test_prog>"
+       },
+       "mmodules": [{
+               "full_name": "test_prog::game_examples"
+       }],
+       "mgroups": []
+}
+{
        "name": "game",
        "class_name": "MGroup",
        "full_name": "test_prog>game>",
index e0c653a..d117c08 100644 (file)
@@ -1,4 +1,38 @@
 {
+       "name": "game_examples",
+       "class_name": "MModule",
+       "full_name": "test_prog::game_examples",
+       "mdoc": null,
+       "visibility": "public",
+       "modifiers": ["module"],
+       "location": {
+               "column_end": 3,
+               "column_start": 1,
+               "line_end": 32,
+               "line_start": 15,
+               "file": "test_location"
+       },
+       "mpackage": {
+               "full_name": "test_prog"
+       },
+       "mgroup": {
+               "full_name": "test_prog>examples>"
+       },
+       "intro_mclasses": [{
+               "full_name": "test_prog::MyGame"
+       }],
+       "mclassdefs": [{
+               "full_name": "test_prog$MyGame"
+       }],
+       "intro_mclassdefs": [{
+               "full_name": "test_prog$MyGame"
+       }],
+       "redef_mclassdefs": [],
+       "imports": [{
+               "full_name": "test_prog::game"
+       }]
+}
+{
        "name": "excluded",
        "class_name": "MModule",
        "full_name": "excluded::excluded",
        "redef_mclassdefs": [],
        "imports": [{
                "full_name": "test_prog::test_prog"
+       }, {
+               "full_name": "test_prog::game_examples"
        }]
 }
index ef7ced3..ca0a550 100644 (file)
@@ -25,6 +25,8 @@
                "full_name": "test_prog>"
        },
        "mgroups": [{
+               "full_name": "test_prog>examples>"
+       }, {
                "full_name": "test_prog>game>"
        }, {
                "full_name": "test_prog>platform>"
index 426bc6c..e4b178a 100644 (file)
        }
 }
 {
+       "name": "player_characters",
+       "class_name": "MMethodDef",
+       "full_name": "test_prog$MyGame$Game::player_characters",
+       "mdoc": {
+               "content": "Characters played by human players.",
+               "location": {
+                       "column_end": 0,
+                       "column_start": 2,
+                       "line_end": 26,
+                       "line_start": 25,
+                       "file": "test_location"
+               }
+       },
+       "visibility": "public",
+       "modifiers": ["redef", "fun"],
+       "location": {
+               "column_end": 50,
+               "column_start": 2,
+               "line_end": 23,
+               "line_start": 23,
+               "file": "test_location"
+       },
+       "is_intro": false,
+       "mclassdef": {
+               "full_name": "test_prog$MyGame"
+       },
+       "mproperty": {
+               "full_name": "test_prog::Game::player_characters"
+       },
+       "intro": {
+               "full_name": "test_prog$Game$player_characters"
+       },
+       "intro_mclassdef": {
+               "full_name": "test_prog$Game"
+       },
+       "mmodule": {
+               "full_name": "test_prog::game_examples"
+       },
+       "mgroup": {
+               "full_name": "test_prog>examples>"
+       },
+       "mpackage": {
+               "full_name": "test_prog"
+       },
+       "msignature": {
+               "arity": 0,
+               "mparams": [],
+               "return_mtype": {
+                       "full_name": "test_prog::List[test_prog::Character]"
+               },
+               "vararg_rank": -1
+       }
+}
+{
        "name": "computer_characters",
        "class_name": "MMethodDef",
        "full_name": "test_prog$Game$computer_characters",
        }
 }
 {
+       "name": "computer_characters",
+       "class_name": "MMethodDef",
+       "full_name": "test_prog$MyGame$Game::computer_characters",
+       "mdoc": {
+               "content": "Characters players by computer.",
+               "location": {
+                       "column_end": 0,
+                       "column_start": 2,
+                       "line_end": 29,
+                       "line_start": 28,
+                       "file": "test_location"
+               }
+       },
+       "visibility": "public",
+       "modifiers": ["redef", "fun"],
+       "location": {
+               "column_end": 52,
+               "column_start": 2,
+               "line_end": 25,
+               "line_start": 25,
+               "file": "test_location"
+       },
+       "is_intro": false,
+       "mclassdef": {
+               "full_name": "test_prog$MyGame"
+       },
+       "mproperty": {
+               "full_name": "test_prog::Game::computer_characters"
+       },
+       "intro": {
+               "full_name": "test_prog$Game$computer_characters"
+       },
+       "intro_mclassdef": {
+               "full_name": "test_prog$Game"
+       },
+       "mmodule": {
+               "full_name": "test_prog::game_examples"
+       },
+       "mgroup": {
+               "full_name": "test_prog>examples>"
+       },
+       "mpackage": {
+               "full_name": "test_prog"
+       },
+       "msignature": {
+               "arity": 0,
+               "mparams": [],
+               "return_mtype": {
+                       "full_name": "test_prog::List[test_prog::Character]"
+               },
+               "vararg_rank": -1
+       }
+}
+{
        "name": "start_game",
        "class_name": "MMethodDef",
        "full_name": "test_prog$Game$start_game",
        }
 }
 {
+       "name": "start_game",
+       "class_name": "MMethodDef",
+       "full_name": "test_prog$MyGame$Game::start_game",
+       "mdoc": {
+               "content": "Start the game.\n\nYou have to implement that method!",
+               "location": {
+                       "column_end": 0,
+                       "column_start": 2,
+                       "line_end": 34,
+                       "line_start": 31,
+                       "file": "test_location"
+               }
+       },
+       "visibility": "public",
+       "modifiers": ["redef", "fun"],
+       "location": {
+               "column_end": 28,
+               "column_start": 2,
+               "line_end": 27,
+               "line_start": 27,
+               "file": "test_location"
+       },
+       "is_intro": false,
+       "mclassdef": {
+               "full_name": "test_prog$MyGame"
+       },
+       "mproperty": {
+               "full_name": "test_prog::Game::start_game"
+       },
+       "intro": {
+               "full_name": "test_prog$Game$start_game"
+       },
+       "intro_mclassdef": {
+               "full_name": "test_prog$Game"
+       },
+       "mmodule": {
+               "full_name": "test_prog::game_examples"
+       },
+       "mgroup": {
+               "full_name": "test_prog>examples>"
+       },
+       "mpackage": {
+               "full_name": "test_prog"
+       },
+       "msignature": {
+               "arity": 0,
+               "mparams": [],
+               "return_mtype": null,
+               "vararg_rank": -1
+       }
+}
+{
        "name": "pause_game",
        "class_name": "MMethodDef",
        "full_name": "test_prog$Game$pause_game",
        }
 }
 {
+       "name": "pause_game",
+       "class_name": "MMethodDef",
+       "full_name": "test_prog$MyGame$Game::pause_game",
+       "mdoc": {
+               "content": "Pause the game.\n\nYou have to implement that method!",
+               "location": {
+                       "column_end": 0,
+                       "column_start": 2,
+                       "line_end": 39,
+                       "line_start": 36,
+                       "file": "test_location"
+               }
+       },
+       "visibility": "public",
+       "modifiers": ["redef", "fun"],
+       "location": {
+               "column_end": 28,
+               "column_start": 2,
+               "line_end": 29,
+               "line_start": 29,
+               "file": "test_location"
+       },
+       "is_intro": false,
+       "mclassdef": {
+               "full_name": "test_prog$MyGame"
+       },
+       "mproperty": {
+               "full_name": "test_prog::Game::pause_game"
+       },
+       "intro": {
+               "full_name": "test_prog$Game$pause_game"
+       },
+       "intro_mclassdef": {
+               "full_name": "test_prog$Game"
+       },
+       "mmodule": {
+               "full_name": "test_prog::game_examples"
+       },
+       "mgroup": {
+               "full_name": "test_prog>examples>"
+       },
+       "mpackage": {
+               "full_name": "test_prog"
+       },
+       "msignature": {
+               "arity": 0,
+               "mparams": [],
+               "return_mtype": null,
+               "vararg_rank": -1
+       }
+}
+{
        "name": "stop_game",
        "class_name": "MMethodDef",
        "full_name": "test_prog$Game$stop_game",
        }
 }
 {
+       "name": "stop_game",
+       "class_name": "MMethodDef",
+       "full_name": "test_prog$MyGame$Game::stop_game",
+       "mdoc": {
+               "content": "Stop the game.\n\nYou have to implement that method!",
+               "location": {
+                       "column_end": 0,
+                       "column_start": 2,
+                       "line_end": 44,
+                       "line_start": 41,
+                       "file": "test_location"
+               }
+       },
+       "visibility": "public",
+       "modifiers": ["redef", "fun"],
+       "location": {
+               "column_end": 27,
+               "column_start": 2,
+               "line_end": 31,
+               "line_start": 31,
+               "file": "test_location"
+       },
+       "is_intro": false,
+       "mclassdef": {
+               "full_name": "test_prog$MyGame"
+       },
+       "mproperty": {
+               "full_name": "test_prog::Game::stop_game"
+       },
+       "intro": {
+               "full_name": "test_prog$Game$stop_game"
+       },
+       "intro_mclassdef": {
+               "full_name": "test_prog$Game"
+       },
+       "mmodule": {
+               "full_name": "test_prog::game_examples"
+       },
+       "mgroup": {
+               "full_name": "test_prog>examples>"
+       },
+       "mpackage": {
+               "full_name": "test_prog"
+       },
+       "msignature": {
+               "arity": 0,
+               "mparams": [],
+               "return_mtype": null,
+               "vararg_rank": -1
+       }
+}
+{
+       "name": "_player_characters",
+       "class_name": "MAttributeDef",
+       "full_name": "test_prog$MyGame$_player_characters",
+       "mdoc": null,
+       "visibility": "private",
+       "modifiers": ["private", "var"],
+       "location": {
+               "column_end": 50,
+               "column_start": 2,
+               "line_end": 23,
+               "line_start": 23,
+               "file": "test_location"
+       },
+       "is_intro": true,
+       "mclassdef": {
+               "full_name": "test_prog$MyGame"
+       },
+       "mproperty": {
+               "full_name": "test_prog::game_examples::MyGame::_player_characters"
+       },
+       "intro": {
+               "full_name": "test_prog$MyGame$_player_characters"
+       },
+       "intro_mclassdef": {
+               "full_name": "test_prog$MyGame"
+       },
+       "mmodule": {
+               "full_name": "test_prog::game_examples"
+       },
+       "mgroup": {
+               "full_name": "test_prog>examples>"
+       },
+       "mpackage": {
+               "full_name": "test_prog"
+       },
+       "static_mtype": {
+               "full_name": "test_prog::List[test_prog::Character]"
+       }
+}
+{
+       "name": "player_characters=",
+       "class_name": "MMethodDef",
+       "full_name": "test_prog$MyGame$player_characters=",
+       "mdoc": null,
+       "visibility": "protected",
+       "modifiers": ["protected", "fun"],
+       "location": {
+               "column_end": 50,
+               "column_start": 2,
+               "line_end": 23,
+               "line_start": 23,
+               "file": "test_location"
+       },
+       "is_intro": true,
+       "mclassdef": {
+               "full_name": "test_prog$MyGame"
+       },
+       "mproperty": {
+               "full_name": "test_prog::MyGame::player_characters="
+       },
+       "intro": {
+               "full_name": "test_prog$MyGame$player_characters="
+       },
+       "intro_mclassdef": {
+               "full_name": "test_prog$MyGame"
+       },
+       "mmodule": {
+               "full_name": "test_prog::game_examples"
+       },
+       "mgroup": {
+               "full_name": "test_prog>examples>"
+       },
+       "mpackage": {
+               "full_name": "test_prog"
+       },
+       "msignature": {
+               "arity": 1,
+               "mparams": [{
+                       "is_vararg": false,
+                       "name": "player_characters",
+                       "mtype": {
+                               "full_name": "test_prog::List[test_prog::Character]"
+                       }
+               }],
+               "return_mtype": null,
+               "vararg_rank": -1
+       }
+}
+{
+       "name": "_computer_characters",
+       "class_name": "MAttributeDef",
+       "full_name": "test_prog$MyGame$_computer_characters",
+       "mdoc": null,
+       "visibility": "private",
+       "modifiers": ["private", "var"],
+       "location": {
+               "column_end": 52,
+               "column_start": 2,
+               "line_end": 25,
+               "line_start": 25,
+               "file": "test_location"
+       },
+       "is_intro": true,
+       "mclassdef": {
+               "full_name": "test_prog$MyGame"
+       },
+       "mproperty": {
+               "full_name": "test_prog::game_examples::MyGame::_computer_characters"
+       },
+       "intro": {
+               "full_name": "test_prog$MyGame$_computer_characters"
+       },
+       "intro_mclassdef": {
+               "full_name": "test_prog$MyGame"
+       },
+       "mmodule": {
+               "full_name": "test_prog::game_examples"
+       },
+       "mgroup": {
+               "full_name": "test_prog>examples>"
+       },
+       "mpackage": {
+               "full_name": "test_prog"
+       },
+       "static_mtype": {
+               "full_name": "test_prog::List[test_prog::Character]"
+       }
+}
+{
+       "name": "computer_characters=",
+       "class_name": "MMethodDef",
+       "full_name": "test_prog$MyGame$computer_characters=",
+       "mdoc": null,
+       "visibility": "protected",
+       "modifiers": ["protected", "fun"],
+       "location": {
+               "column_end": 52,
+               "column_start": 2,
+               "line_end": 25,
+               "line_start": 25,
+               "file": "test_location"
+       },
+       "is_intro": true,
+       "mclassdef": {
+               "full_name": "test_prog$MyGame"
+       },
+       "mproperty": {
+               "full_name": "test_prog::MyGame::computer_characters="
+       },
+       "intro": {
+               "full_name": "test_prog$MyGame$computer_characters="
+       },
+       "intro_mclassdef": {
+               "full_name": "test_prog$MyGame"
+       },
+       "mmodule": {
+               "full_name": "test_prog::game_examples"
+       },
+       "mgroup": {
+               "full_name": "test_prog>examples>"
+       },
+       "mpackage": {
+               "full_name": "test_prog"
+       },
+       "msignature": {
+               "arity": 1,
+               "mparams": [{
+                       "is_vararg": false,
+                       "name": "computer_characters",
+                       "mtype": {
+                               "full_name": "test_prog::List[test_prog::Character]"
+                       }
+               }],
+               "return_mtype": null,
+               "vararg_rank": -1
+       }
+}
+{
        "name": "start",
        "class_name": "MMethodDef",
        "full_name": "test_prog$Starter$start",
index 6757986..f2b22b3 100644 (file)
        },
        "mpropdefs": [{
                "full_name": "test_prog$Game$player_characters"
+       }, {
+               "full_name": "test_prog$MyGame$Game::player_characters"
        }],
        "intro_mclass": {
                "full_name": "test_prog::Game"
        },
        "mpropdefs": [{
                "full_name": "test_prog$Game$computer_characters"
+       }, {
+               "full_name": "test_prog$MyGame$Game::computer_characters"
        }],
        "intro_mclass": {
                "full_name": "test_prog::Game"
        },
        "mpropdefs": [{
                "full_name": "test_prog$Game$start_game"
+       }, {
+               "full_name": "test_prog$MyGame$Game::start_game"
        }],
        "intro_mclass": {
                "full_name": "test_prog::Game"
        },
        "mpropdefs": [{
                "full_name": "test_prog$Game$pause_game"
+       }, {
+               "full_name": "test_prog$MyGame$Game::pause_game"
        }],
        "intro_mclass": {
                "full_name": "test_prog::Game"
        },
        "mpropdefs": [{
                "full_name": "test_prog$Game$stop_game"
+       }, {
+               "full_name": "test_prog$MyGame$Game::stop_game"
        }],
        "intro_mclass": {
                "full_name": "test_prog::Game"
        }
 }
 {
+       "name": "_player_characters",
+       "class_name": "MAttribute",
+       "full_name": "test_prog::game_examples::MyGame::_player_characters",
+       "mdoc": null,
+       "visibility": "private",
+       "modifiers": ["private", "var"],
+       "location": {
+               "column_end": 50,
+               "column_start": 2,
+               "line_end": 23,
+               "line_start": 23,
+               "file": "test_location"
+       },
+       "intro": {
+               "full_name": "test_prog$MyGame$_player_characters"
+       },
+       "intro_mclassdef": {
+               "full_name": "test_prog$MyGame"
+       },
+       "mpropdefs": [{
+               "full_name": "test_prog$MyGame$_player_characters"
+       }],
+       "intro_mclass": {
+               "full_name": "test_prog::MyGame"
+       },
+       "mpackage": {
+               "full_name": "test_prog"
+       },
+       "static_mtype": {
+               "full_name": "test_prog::List[test_prog::Character]"
+       }
+}
+{
+       "name": "player_characters=",
+       "class_name": "MMethod",
+       "full_name": "test_prog::MyGame::player_characters=",
+       "mdoc": null,
+       "visibility": "protected",
+       "modifiers": ["protected", "fun"],
+       "location": {
+               "column_end": 50,
+               "column_start": 2,
+               "line_end": 23,
+               "line_start": 23,
+               "file": "test_location"
+       },
+       "intro": {
+               "full_name": "test_prog$MyGame$player_characters="
+       },
+       "intro_mclassdef": {
+               "full_name": "test_prog$MyGame"
+       },
+       "mpropdefs": [{
+               "full_name": "test_prog$MyGame$player_characters="
+       }],
+       "intro_mclass": {
+               "full_name": "test_prog::MyGame"
+       },
+       "mpackage": {
+               "full_name": "test_prog"
+       },
+       "is_init": false,
+       "msignature": {
+               "arity": 1,
+               "mparams": [{
+                       "is_vararg": false,
+                       "name": "player_characters",
+                       "mtype": {
+                               "full_name": "test_prog::List[test_prog::Character]"
+                       }
+               }],
+               "return_mtype": null,
+               "vararg_rank": -1
+       }
+}
+{
+       "name": "_computer_characters",
+       "class_name": "MAttribute",
+       "full_name": "test_prog::game_examples::MyGame::_computer_characters",
+       "mdoc": null,
+       "visibility": "private",
+       "modifiers": ["private", "var"],
+       "location": {
+               "column_end": 52,
+               "column_start": 2,
+               "line_end": 25,
+               "line_start": 25,
+               "file": "test_location"
+       },
+       "intro": {
+               "full_name": "test_prog$MyGame$_computer_characters"
+       },
+       "intro_mclassdef": {
+               "full_name": "test_prog$MyGame"
+       },
+       "mpropdefs": [{
+               "full_name": "test_prog$MyGame$_computer_characters"
+       }],
+       "intro_mclass": {
+               "full_name": "test_prog::MyGame"
+       },
+       "mpackage": {
+               "full_name": "test_prog"
+       },
+       "static_mtype": {
+               "full_name": "test_prog::List[test_prog::Character]"
+       }
+}
+{
+       "name": "computer_characters=",
+       "class_name": "MMethod",
+       "full_name": "test_prog::MyGame::computer_characters=",
+       "mdoc": null,
+       "visibility": "protected",
+       "modifiers": ["protected", "fun"],
+       "location": {
+               "column_end": 52,
+               "column_start": 2,
+               "line_end": 25,
+               "line_start": 25,
+               "file": "test_location"
+       },
+       "intro": {
+               "full_name": "test_prog$MyGame$computer_characters="
+       },
+       "intro_mclassdef": {
+               "full_name": "test_prog$MyGame"
+       },
+       "mpropdefs": [{
+               "full_name": "test_prog$MyGame$computer_characters="
+       }],
+       "intro_mclass": {
+               "full_name": "test_prog::MyGame"
+       },
+       "mpackage": {
+               "full_name": "test_prog"
+       },
+       "is_init": false,
+       "msignature": {
+               "arity": 1,
+               "mparams": [{
+                       "is_vararg": false,
+                       "name": "computer_characters",
+                       "mtype": {
+                               "full_name": "test_prog::List[test_prog::Character]"
+                       }
+               }],
+               "return_mtype": null,
+               "vararg_rank": -1
+       }
+}
+{
        "name": "start",
        "class_name": "MMethod",
        "full_name": "test_prog::Starter::start",
index 60e70df..b5e00b5 100644 (file)
@@ -2,7 +2,7 @@
        "full_name": "test_prog"
 }
 {
-       "full_name": "excluded::excluded"
+       "full_name": "test_prog::game_examples"
 }
 {
        "full_name": "test_prog::Object"