doc/commands: allow NitUnit entities in model view
authorAlexandre Terrasa <alexandre@moz-code.org>
Wed, 2 May 2018 23:19:49 +0000 (19:19 -0400)
committerAlexandre Terrasa <alexandre@moz-code.org>
Thu, 10 May 2018 14:16:57 +0000 (10:16 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

src/doc/commands/tests/test_commands.nit
src/doc/commands/tests/test_commands_catalog.nit
src/doc/commands/tests/test_commands_http.nit
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/term/tests/test_term.sav/test_term_catalog_stats.res

index d91701b..c5d03a3 100644 (file)
@@ -58,7 +58,7 @@ class TestCommands
                var filters = new ModelFilter(
                        private_visibility,
                        accept_fictive = false,
-                       accept_test = false)
+                       accept_test = true)
 
                test_builder = modelbuilder
                test_view = new ModelView(model, mainmodule, filters)
index 9d60706..07e82d8 100644 (file)
@@ -57,7 +57,7 @@ class TestCommandsCatalog
        end
 
        fun test_cmd_catalog_search is test do
-               var cmd = new CmdCatalogSearch(test_view, test_catalog, "test")
+               var cmd = new CmdCatalogSearch(test_view, test_catalog, "testprog")
                var res = cmd.init_command
                assert res isa CmdSuccess
                assert cmd.results.as(not null).first.full_name == "test_prog"
index c081699..f2d5e18 100644 (file)
@@ -287,7 +287,7 @@ class TestCommandsHttp
        # CmdCatalog
 
        fun test_cmd_http_catalog_search is test do
-               var req = new_request("/?q=test&l=1")
+               var req = new_request("/?q=testprog&l=1")
                var cmd = new CmdCatalogSearch(test_view, test_catalog)
                var res = cmd.http_init(req)
                assert res isa CmdSuccess
index 07d815d..5d6c8d9 100644 (file)
                "html_synopsis": "<span class=\"synopsys nitdoc\">A worlg RPG abstraction.</span>",
                "modifiers": ["module"]
        }, {
+               "name": "test_game",
+               "namespace": [{
+                       "name": "test_prog",
+                       "synopsis": "Test program for model tools."
+               }, "::", {
+                       "name": "test_game"
+               }],
+               "class_name": "MModule",
+               "full_name": "test_prog::test_game",
+               "visibility": "public",
+               "modifiers": ["module"]
+       }, {
                "name": "test_prog",
                "synopsis": "A test program with a fake model to check model tools.",
                "namespace": [{
index c392050..d58aef9 100644 (file)
                }
        }],
        "page": 1,
-       "count": 113,
+       "count": 121,
        "limit": 10,
-       "max": 11
+       "max": 12
 }
index 901dd3e..88d5e5e 100644 (file)
@@ -204,7 +204,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 == 10
+               assert cmd.results.as(not null).length == 11
        end
 
        fun test_cmd_results_random is test do
index fd8b8ba..3f34348 100644 (file)
@@ -1,9 +1,9 @@
 Catalog statistics:
  * 2 packages
- * 10 modules
- * 75 methods
- * 23 classes
- * 471 lines of code
+ * 11 modules
+ * 78 methods
+ * 25 classes
+ * 502 lines of code
  * 6 contributors
  * 1 maintainers
  * 2 tags