src/model/model_index: fix tests
authorAlexandre Terrasa <alexandre@moz-code.org>
Thu, 14 Jun 2018 20:20:12 +0000 (16:20 -0400)
committerAlexandre Terrasa <alexandre@moz-code.org>
Thu, 5 Jul 2018 00:43:39 +0000 (20:43 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

25 files changed:
src/doc/commands/tests/test_commands_catalog.nit
src/doc/commands/tests/test_commands_http.nit
src/doc/commands/tests/test_commands_model.nit
src/doc/commands/tests/test_commands_parser.nit
src/doc/templates/tests/test_html_commands.sav/test_cmd_search.res
src/doc/templates/tests/test_json_commands.sav/test_cmd_search.res
src/doc/templates/tests/test_md_commands.sav/test_cmd_search.res
src/doc/term/tests/test_term.sav/test_mentity_not_found.res
src/doc/term/tests/test_term.sav/test_search.res
src/doc/term/tests/test_term.sav/test_term_catalog_search.res
tests/sav/test_model_index_args10.res
tests/sav/test_model_index_args11.res
tests/sav/test_model_index_args12.res
tests/sav/test_model_index_args13.res
tests/sav/test_model_index_args14.res
tests/sav/test_model_index_args15.res
tests/sav/test_model_index_args16.res
tests/sav/test_model_index_args17.res
tests/sav/test_model_index_args18.res
tests/sav/test_model_index_args19.res
tests/sav/test_model_index_args20.res
tests/sav/test_model_index_args21.res
tests/sav/test_model_index_args8.res
tests/sav/test_model_index_args9.res
tests/test_model_index.args

index ecb038c..5e921b5 100644 (file)
@@ -74,7 +74,7 @@ class TestCommandsCatalog
 
        fun test_cmd_catalog_search_with_filter is test do
                var filter = new ModelFilter(accept_example = false)
-               var cmd = new CmdCatalogSearch(test_model, test_catalog, filter, query = "MyGame")
+               var cmd = new CmdCatalogSearch(test_model, test_catalog, filter, query = "MGame")
                var res = cmd.init_command
                assert res isa CmdSuccess
                assert cmd.results.as(not null).first.full_name == "test_prog::Game" # not MyGame
index a08854c..57f5dd6 100644 (file)
@@ -45,7 +45,7 @@ class TestCommandsHttp
        end
 
        fun test_cmd_http_entity_not_found is test do
-               var req = new_request("/Characterzzz")
+               var req = new_request("/Characterz")
                var cmd = new CmdEntity(test_model)
                var res = cmd.http_init(req)
                assert res isa ErrorMEntityNotFound
index 4909823..4847987 100644 (file)
@@ -31,7 +31,7 @@ class TestCommandsModel
        end
 
        fun test_cmd_entity_not_found is test do
-               var cmd = new CmdEntity(test_model, mentity_name = "test_prog::Characterzz")
+               var cmd = new CmdEntity(test_model, mentity_name = "test_prog::Characterz")
                var res = cmd.init_command
                assert res isa ErrorMEntityNotFound
                assert res.suggestions.first.full_name == "test_prog::Character"
index ea54a8b..41cc36b 100644 (file)
@@ -210,7 +210,7 @@ class TestCommandsParser
 
        fun test_cmd_parser_search_limit is test do
                var parser = new CommandParser(test_model, test_main, test_builder, test_catalog)
-               var cmd = parser.parse("search: Caracter | limit: 2")
+               var cmd = parser.parse("search: strength | limit: 2")
                assert cmd isa CmdSearch
                assert parser.error == null
                assert cmd.results.as(not null).length == 2
index a6b9ace..2953e58 100644 (file)
@@ -1 +1 @@
-<ul><li><a href="test_prog_58d_58dCareer" title="A `Career` gives a characteristic bonus or malus to the character.">Career</a> - <span class="synopsys nitdoc">A <code class="nitcode"><span class="nitcode"><span class="line"><span class="nc_t">Career</span></span></span></code> gives a characteristic bonus or malus to the character.</span></li><li><a href="test_prog_58d_58dCharacter_58d_58dcareer" title="The current `Career` of the character.">career</a> - <span class="synopsys nitdoc">The current <code class="nitcode"><span class="nitcode"><span class="line"><span class="nc_t">Career</span></span></span></code> of the character.</span></li><li><a href="test_prog_62dgame_62d" title="Gaming group">game</a> - <span class="synopsys nitdoc">Gaming group</span></li><li><a href="test_prog_58d_58dgame" title="A game abstraction for RPG.">game</a> - <span class="synopsys nitdoc">A game abstraction for RPG.</span></li><li><a href="test_prog_58d_58draces" title="Races of the game.">races</a> - <span class="synopsys nitdoc">Races of the game.</span></li><li><a href="test_prog_58d_58dcareers" title="Careers of the game.">careers</a> - <span class="synopsys nitdoc">Careers of the game.</span></li><li><a href="test_prog_58d_58dGame" title="This is the interface you have to implement to use ure gaming platform.">Game</a> - <span class="synopsys nitdoc">This is the interface you have to implement to use ure gaming platform.</span></li><li><a href="test_prog_58d_58dRace" title="Race determines basic characteristics and what the character will be able to do in life.">Race</a> - <span class="synopsys nitdoc">Race determines basic characteristics and what the character will be able to do in life.</span></li><li><a href="test_prog_58d_58dStarter">Starter</a></li><li><a href="test_prog_58d_58dCharacter_58d_58dage">age</a></li></ul>
+<ul><li><a href="test_prog_58d_58dCareer" title="A `Career` gives a characteristic bonus or malus to the character.">Career</a> - <span class="synopsys nitdoc">A <code class="nitcode"><span class="nitcode"><span class="line"><span class="nc_t">Career</span></span></span></code> gives a characteristic bonus or malus to the character.</span></li></ul>
index d58aef9..93e7114 100644 (file)
                "visibility": "public",
                "html_synopsis": "<span class=\"synopsys nitdoc\">A <code class=\"nitcode\"><span class=\"nitcode\"><span class=\"line\"><span class=\"nc_t\">Career</span></span></span></code> gives a characteristic bonus or malus to the character.</span>",
                "modifiers": ["abstract class"]
-       }, {
-               "name": "career",
-               "synopsis": "The current `Career` of the character.",
-               "namespace": [{
-                       "name": "test_prog",
-                       "synopsis": "Test program for model tools."
-               }, "::", {
-                       "name": "Character",
-                       "synopsis": "Characters can be played by both the human or the machine."
-               }, "::", {
-                       "name": "career",
-                       "synopsis": "The current `Career` of the character."
-               }],
-               "class_name": "MMethod",
-               "full_name": "test_prog::Character::career",
-               "visibility": "public",
-               "html_synopsis": "<span class=\"synopsys nitdoc\">The current <code class=\"nitcode\"><span class=\"nitcode\"><span class=\"line\"><span class=\"nc_t\">Career</span></span></span></code> of the character.</span>",
-               "modifiers": ["fun"],
-               "msignature": {
-                       "arity": 0,
-                       "mparameters": [],
-                       "return_mtype": {
-                               "name": "nullable Career",
-                               "synopsis": "A `Career` gives a characteristic bonus or malus to the character.",
-                               "html_synopsis": "<span class=\"synopsys nitdoc\">A <code class=\"nitcode\"><span class=\"nitcode\"><span class=\"line\"><span class=\"nc_t\">Career</span></span></span></code> gives a characteristic bonus or malus to the character.</span>"
-                       }
-               }
-       }, {
-               "name": "game",
-               "synopsis": "Gaming group",
-               "namespace": [{
-                       "name": "test_prog",
-                       "synopsis": "Test program for model tools."
-               }, ">", {
-                       "name": "game",
-                       "synopsis": "Gaming group"
-               }, ">"],
-               "class_name": "MGroup",
-               "full_name": "test_prog>game>",
-               "visibility": "public",
-               "html_synopsis": "<span class=\"synopsys nitdoc\">Gaming group</span>",
-               "modifiers": ["group"]
-       }, {
-               "name": "game",
-               "synopsis": "A game abstraction for RPG.",
-               "namespace": [{
-                       "name": "test_prog",
-                       "synopsis": "Test program for model tools."
-               }, "::", {
-                       "name": "game",
-                       "synopsis": "A game abstraction for RPG."
-               }],
-               "class_name": "MModule",
-               "full_name": "test_prog::game",
-               "visibility": "public",
-               "html_synopsis": "<span class=\"synopsys nitdoc\">A game abstraction for RPG.</span>",
-               "modifiers": ["module"]
-       }, {
-               "name": "races",
-               "synopsis": "Races of the game.",
-               "namespace": [{
-                       "name": "test_prog",
-                       "synopsis": "Test program for model tools."
-               }, "::", {
-                       "name": "races",
-                       "synopsis": "Races of the game."
-               }],
-               "class_name": "MModule",
-               "full_name": "test_prog::races",
-               "visibility": "public",
-               "html_synopsis": "<span class=\"synopsys nitdoc\">Races of the game.</span>",
-               "modifiers": ["module"]
-       }, {
-               "name": "careers",
-               "synopsis": "Careers of the game.",
-               "namespace": [{
-                       "name": "test_prog",
-                       "synopsis": "Test program for model tools."
-               }, "::", {
-                       "name": "careers",
-                       "synopsis": "Careers of the game."
-               }],
-               "class_name": "MModule",
-               "full_name": "test_prog::careers",
-               "visibility": "public",
-               "html_synopsis": "<span class=\"synopsys nitdoc\">Careers of the game.</span>",
-               "modifiers": ["module"]
-       }, {
-               "name": "Game",
-               "synopsis": "This is the interface you have to implement to use ure gaming platform.",
-               "namespace": [{
-                       "name": "test_prog",
-                       "synopsis": "Test program for model tools."
-               }, "::", {
-                       "name": "Game",
-                       "synopsis": "This is the interface you have to implement to use ure gaming platform."
-               }],
-               "class_name": "MClass",
-               "full_name": "test_prog::Game",
-               "visibility": "public",
-               "html_synopsis": "<span class=\"synopsys nitdoc\">This is the interface you have to implement to use ure gaming platform.</span>",
-               "modifiers": ["interface"]
-       }, {
-               "name": "Race",
-               "synopsis": "Race determines basic characteristics and what the character will be able to do in life.",
-               "namespace": [{
-                       "name": "test_prog",
-                       "synopsis": "Test program for model tools."
-               }, "::", {
-                       "name": "Race",
-                       "synopsis": "Race determines basic characteristics and what the character will be able to do in life."
-               }],
-               "class_name": "MClass",
-               "full_name": "test_prog::Race",
-               "visibility": "public",
-               "html_synopsis": "<span class=\"synopsys nitdoc\">Race determines basic characteristics and what the character will be able to do in life.</span>",
-               "modifiers": ["abstract class"]
-       }, {
-               "name": "Starter",
-               "namespace": [{
-                       "name": "test_prog",
-                       "synopsis": "Test program for model tools."
-               }, "::", {
-                       "name": "Starter"
-               }],
-               "class_name": "MClass",
-               "full_name": "test_prog::Starter",
-               "visibility": "public",
-               "modifiers": ["class"]
-       }, {
-               "name": "age",
-               "namespace": [{
-                       "name": "test_prog",
-                       "synopsis": "Test program for model tools."
-               }, "::", {
-                       "name": "Character",
-                       "synopsis": "Characters can be played by both the human or the machine."
-               }, "::", {
-                       "name": "age"
-               }],
-               "class_name": "MMethod",
-               "full_name": "test_prog::Character::age",
-               "visibility": "public",
-               "modifiers": ["fun"],
-               "msignature": {
-                       "arity": 0,
-                       "mparameters": [],
-                       "return_mtype": {
-                               "name": "Int",
-                               "synopsis": "Some services about Integers.",
-                               "html_synopsis": "<span class=\"synopsys nitdoc\">Some services about Integers.</span>"
-                       }
-               }
        }],
        "page": 1,
-       "count": 121,
+       "count": 1,
        "limit": 10,
-       "max": 12
+       "max": 1
 }
index 577166b..695c2ff 100644 (file)
@@ -1,10 +1 @@
 * `Career` - A `Career` gives a characteristic bonus or malus to the character.
-* `career` - The current `Career` of the character.
-* `game` - Gaming group
-* `game` - A game abstraction for RPG.
-* `races` - Races of the game.
-* `careers` - Careers of the game.
-* `Game` - This is the interface you have to implement to use ure gaming platform.
-* `Race` - Race determines basic characteristics and what the character will be able to do in life.
-* `Starter`
-* `age`
index ff87303..c7eba98 100644 (file)
@@ -7,14 +7,4 @@ Did you mean?
    class Character
    test_location
 
- + test_prog::character
-   # Characters are playable entity in the world.
-   module character
-   test_location
-
- + test_prog::Career
-   # A `Career` gives a characteristic bonus or malus to the character.
-   abstract class Career
-   test_location
-
 
index 965f6dc..35998c4 100644 (file)
@@ -5,8 +5,3 @@ Search results for `Caracter`:
    class Character
    test_location
 
- + test_prog::character
-   # Characters are playable entity in the world.
-   module character
-   test_location
-
index ae5fe51..35998c4 100644 (file)
@@ -5,13 +5,3 @@ Search results for `Caracter`:
    class Character
    test_location
 
- + test_prog::character
-   # Characters are playable entity in the world.
-   module character
-   test_location
-
- + test_prog::Career
-   # A `Career` gives a characteristic bonus or malus to the character.
-   abstract class Career
-   test_location
-
index d68740c..a6058fd 100644 (file)
@@ -1,12 +1,3 @@
-# elfves
+# elf
 
- * 4: Elf (test_prog::Elf)
- * 5: Sys (test_prog::Sys)
- * 5: careers (test_prog::careers)
- * 5: examples (test_prog>examples>)
- * 5: excluded (excluded>)
- * 5: excluded (excluded)
- * 5: excluded (excluded::excluded)
- * 5: game (test_prog>game>)
- * 5: game (test_prog::game)
- * 4: races (test_prog::races)
+ * 1: Elf (test_prog::Elf)
index 02cba00..b8eaa33 100644 (file)
@@ -1,12 +1,3 @@
-# Dwarves
+# test_prog::Dwarv
 
- * 12: Sys (test_prog::Sys)
- * 8: excluded (excluded>)
- * 7: excluded (excluded)
- * 13: game (test_prog>game>)
- * 13: man (test_prog>man>)
- * 13: races (test_prog::races)
- * 13: rpg (test_prog>rpg>)
- * 13: rpg (test_prog::rpg)
- * 9: test_prog (test_prog)
- * 9: test_prog (test_prog>)
+ * 1: Dwarf (test_prog::Dwarf)
index b1ae3db..492b372 100644 (file)
@@ -1,12 +1,3 @@
-# test_prof::Dwarves
+# test_prof::Dwarf
 
- * 5: Career (test_prog::Career)
- * 4: Dwarf (test_prog::Dwarf)
- * 6: Game (test_prog::Game)
- * 6: Race (test_prog::Race)
- * 5: Starter (test_prog::Starter)
- * 5: careers (test_prog::careers)
- * 7: character (test_prog::character)
- * 6: game (test_prog::game)
- * 5: races (test_prog::races)
- * 7: rpg (test_prog::rpg)
+ * 1: Dwarf (test_prog::Dwarf)
index fe5bfd3..62bdafb 100644 (file)
@@ -1,12 +1,3 @@
 # Obj
 
- * 3: + (test_prog::Int::+)
- * 3: > (test_prog::Int::>)
- * 3: Elf (test_prog::Elf)
- * 3: Int (test_prog::Int)
  * 1: Object (test_prog::Object)
- * 3: Sys (test_prog::Sys)
- * 3: age (test_prog::Character::age)
- * 3: man (test_prog>man>)
- * 3: rpg (test_prog::rpg)
- * 3: rpg (test_prog>rpg>)
index 3fa271e..806088f 100644 (file)
@@ -1,12 +1,12 @@
 # C
 
- * 1: * (test_prog::Float::*)
  * 1: * (test_prog::Int::*)
+ * 1: * (test_prog::Float::*)
+ * 1: + (test_prog::Int::+)
  * 1: + (test_prog::Float::+)
- * 1: - (test_prog::Int::-)
  * 1: - (test_prog::Float::-)
+ * 1: - (test_prog::Int::-)
  * 1: / (test_prog::Float::/)
  * 1: / (test_prog::Int::/)
- * 1: > (test_prog::Int::>)
  * 1: > (test_prog::Float::>)
  * 1: Career (test_prog::Career)
index 65b6c73..dda5763 100644 (file)
@@ -1,12 +1,6 @@
 # to
 
- * 2: * (test_prog::Float::*)
- * 2: + (test_prog::Float::+)
- * 2: - (test_prog::Float::-)
- * 2: / (test_prog::Float::/)
- * 2: / (test_prog::Int::/)
- * 2: == (test_prog::Object::==)
- * 2: > (test_prog::Int::>)
- * 2: > (test_prog::Float::>)
  * 1: to_f (test_prog::Int::to_f)
+ * 3: total_endurance (test_prog::Character::total_endurance)
+ * 4: total_intelligence (test_prog::Character::total_intelligence)
  * 2: total_strengh (test_prog::Character::total_strengh)
index bd3e0ad..7e420df 100644 (file)
@@ -1,12 +1,3 @@
-# Dwa
+# test_prog::Dwar
 
- * 13: Dwarf (test_prog::Dwarf)
- * 9: excluded (excluded>)
- * 8: excluded (excluded)
- * 14: game (test_prog>game>)
- * 14: game (test_prog::game)
- * 13: man (test_prog>man>)
- * 14: rpg (test_prog>rpg>)
- * 14: rpg (test_prog::rpg)
- * 10: test_prog (test_prog>)
- * 9: test_prog (test_prog)
+ * 1: Dwarf (test_prog::Dwarf)
index 89e9bc8..5ee70f9 100644 (file)
@@ -3,10 +3,10 @@
  * 1: Career (test_prog::Career)
  * 2: Character (test_prog::Character)
  * 3: Combatable (test_prog::Combatable)
- * 3: Elf (test_prog::Elf)
- * 3: Int (test_prog::Int)
- * 3: Sys (test_prog::Sys)
- * 4: game (test_prog::game)
- * 3: rpg (test_prog::rpg)
- * 3: test_prog (test_prog)
- * 3: test_prog (test_prog>)
+ * 4: age (test_prog::Character::age)
+ * 8: name (test_prog::Character::name)
+ * 7: quit (test_prog::Character::quit)
+ * 6: race (test_prog::Character::race)
+ * 5: sex (test_prog::Character::sex)
+ * 9: age= (test_prog::Character::age=)
+ * 10: sex= (test_prog::Character::sex=)
index 3fa271e..806088f 100644 (file)
@@ -1,12 +1,12 @@
 # C
 
- * 1: * (test_prog::Float::*)
  * 1: * (test_prog::Int::*)
+ * 1: * (test_prog::Float::*)
+ * 1: + (test_prog::Int::+)
  * 1: + (test_prog::Float::+)
- * 1: - (test_prog::Int::-)
  * 1: - (test_prog::Float::-)
+ * 1: - (test_prog::Int::-)
  * 1: / (test_prog::Float::/)
  * 1: / (test_prog::Int::/)
- * 1: > (test_prog::Int::>)
  * 1: > (test_prog::Float::>)
  * 1: Career (test_prog::Career)
index d2cf349..dda5763 100644 (file)
@@ -1,12 +1,6 @@
 # to
 
- * 2: * (test_prog::Int::*)
- * 2: * (test_prog::Float::*)
- * 2: + (test_prog::Float::+)
- * 2: - (test_prog::Float::-)
- * 2: / (test_prog::Float::/)
- * 2: / (test_prog::Int::/)
- * 2: > (test_prog::Float::>)
- * 2: > (test_prog::Int::>)
  * 1: to_f (test_prog::Int::to_f)
+ * 3: total_endurance (test_prog::Character::total_endurance)
+ * 4: total_intelligence (test_prog::Character::total_intelligence)
  * 2: total_strengh (test_prog::Character::total_strengh)
index 41184bb..735e8ba 100644 (file)
@@ -1,12 +1,3 @@
-# Foo
+# Floot
 
- * 3: * (test_prog::Int::*)
- * 2: Bool (test_prog::Bool)
- * 3: Elf (test_prog::Elf)
- * 3: Float (test_prog::Float)
- * 3: Int (test_prog::Int)
- * 3: Sys (test_prog::Sys)
- * 3: dps (test_prog::Weapon::dps)
- * 3: man (test_prog>man>)
- * 3: rpg (test_prog>rpg>)
- * 3: rpg (test_prog::rpg)
+ * 1: Float (test_prog::Float)
index afc25c4..5ee70f9 100644 (file)
@@ -3,10 +3,10 @@
  * 1: Career (test_prog::Career)
  * 2: Character (test_prog::Character)
  * 3: Combatable (test_prog::Combatable)
- * 3: Elf (test_prog::Elf)
- * 3: Int (test_prog::Int)
- * 3: Sys (test_prog::Sys)
- * 3: rpg (test_prog::rpg)
- * 3: test_prog (test_prog>)
- * 3: test_prog (test_prog::test_prog)
- * 3: test_prog (test_prog)
+ * 4: age (test_prog::Character::age)
+ * 8: name (test_prog::Character::name)
+ * 7: quit (test_prog::Character::quit)
+ * 6: race (test_prog::Character::race)
+ * 5: sex (test_prog::Character::sex)
+ * 9: age= (test_prog::Character::age=)
+ * 10: sex= (test_prog::Character::sex=)
index 6381895..0b99c62 100644 (file)
@@ -4,8 +4,8 @@
  * 1: * (test_prog::Int::*)
  * 1: + (test_prog::Int::+)
  * 1: + (test_prog::Float::+)
- * 1: - (test_prog::Int::-)
  * 1: - (test_prog::Float::-)
+ * 1: - (test_prog::Int::-)
  * 1: / (test_prog::Int::/)
  * 1: / (test_prog::Float::/)
  * 1: > (test_prog::Int::>)
index d8bc532..735e8ba 100644 (file)
@@ -1,12 +1,3 @@
-# Foo
+# Floot
 
- * 2: Bool (test_prog::Bool)
- * 3: Elf (test_prog::Elf)
- * 3: Float (test_prog::Float)
- * 3: Int (test_prog::Int)
- * 3: Sys (test_prog::Sys)
- * 3: age (test_prog::Character::age)
- * 3: dps (test_prog::Weapon::dps)
- * 3: man (test_prog>man>)
- * 3: rpg (test_prog::rpg)
- * 3: rpg (test_prog>rpg>)
+ * 1: Float (test_prog::Float)
index 62f7bde..7bce83b 100644 (file)
@@ -6,16 +6,16 @@ test_prog -q C --full-name-prefix --no-color
 test_prog -q test_prog:: --full-name-prefix --no-color
 test_prog -q test_prog::C --full-name-prefix --no-color
 test_prog -q A --name-similarity --no-color
-test_prog -q Foo --name-similarity --no-color
-test_prog -q elfves --name-similarity --no-color
-test_prog -q Dwarves --full-name-similarity --no-color
-test_prog -q test_prof::Dwarves --full-name-similarity --no-color
+test_prog -q Floot --name-similarity --no-color
+test_prog -q elf --name-similarity --no-color
+test_prog -q test_prog::Dwarv --full-name-similarity --no-color
+test_prog -q test_prof::Dwarf --full-name-similarity --no-color
 test_prog -q Obj --name --no-color
 test_prog -q C --name --no-color
 test_prog -q to --name --no-color
-test_prog -q Dwa --full-name --no-color
+test_prog -q test_prog::Dwar --full-name --no-color
 test_prog -q test_prog::C --full-name --no-color
 test_prog -q C --no-color
 test_prog -q to --no-color
-test_prog -q Foo --no-color
+test_prog -q Floot --no-color
 test_prog -q test_prog::C --no-color