doc/commands: remove default filter from tests
authorAlexandre Terrasa <alexandre@moz-code.org>
Tue, 15 May 2018 13:38:51 +0000 (09:38 -0400)
committerAlexandre Terrasa <alexandre@moz-code.org>
Thu, 14 Jun 2018 20:33:09 +0000 (16:33 -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_graph.nit
src/doc/commands/tests/test_commands_http.nit
src/doc/commands/tests/test_commands_json.nit
src/doc/commands/tests/test_commands_json.sav/test_cmd_mentities.res
src/doc/commands/tests/test_commands_model.nit
src/doc/commands/tests/test_commands_parser.nit
src/doc/commands/tests/test_commands_usage.nit

index b5828f1..d9d6564 100644 (file)
@@ -40,12 +40,6 @@ class TestCommands
        # Mainmodule used for tests
        var test_main: MModule is noinit
 
-       # Filters used for tests
-       var test_filter = new ModelFilter(
-               private_visibility,
-               accept_fictive = false,
-               accept_test = false)
-
        # Initialize test variables
        #
        # Must be called before test execution.
index 5b4d4cd..12389f2 100644 (file)
@@ -50,14 +50,14 @@ class TestCommandsCatalog
        end
 
        fun test_cmd_catalog is test do
-               var cmd = new CmdCatalogPackages(test_model, test_catalog, test_filter)
+               var cmd = new CmdCatalogPackages(test_model, test_catalog)
                var res = cmd.init_command
                assert res isa CmdSuccess
                assert cmd.results.as(not null).first.full_name == "test_prog"
        end
 
        fun test_cmd_catalog_search is test do
-               var cmd = new CmdCatalogSearch(test_model, test_catalog, test_filter, "testprog")
+               var cmd = new CmdCatalogSearch(test_model, test_catalog, query = "testprog")
                var res = cmd.init_command
                assert res isa CmdSuccess
                assert cmd.results.as(not null).first.full_name == "test_prog"
@@ -65,21 +65,21 @@ class TestCommandsCatalog
        end
 
        fun test_cmd_catalog_stats is test do
-               var cmd = new CmdCatalogStats(test_model, test_catalog, test_filter)
+               var cmd = new CmdCatalogStats(test_model, test_catalog)
                var res = cmd.init_command
                assert res isa CmdSuccess
                assert cmd.stats != null
        end
 
        fun test_cmd_catalog_tags is test do
-               var cmd = new CmdCatalogTags(test_model, test_catalog, test_filter)
+               var cmd = new CmdCatalogTags(test_model, test_catalog)
                var res = cmd.init_command
                assert res isa CmdSuccess
                assert cmd.packages_count_by_tags.as(not null).length == 2
        end
 
        fun test_cmd_catalog_tag is test do
-               var cmd = new CmdCatalogTag(test_model, test_catalog, test_filter, "test")
+               var cmd = new CmdCatalogTag(test_model, test_catalog, tag = "test")
                var res = cmd.init_command
                assert res isa CmdSuccess
                assert cmd.tag == "test"
@@ -87,7 +87,7 @@ class TestCommandsCatalog
        end
 
        fun test_cmd_catalog_person is test do
-               var cmd = new CmdCatalogPerson(test_model, test_catalog, test_filter,
+               var cmd = new CmdCatalogPerson(test_model, test_catalog,
                        person_name = "Alexandre Terrasa")
                var res = cmd.init_command
                assert res isa CmdSuccess
@@ -95,7 +95,7 @@ class TestCommandsCatalog
        end
 
        fun test_cmd_catalog_contributing is test do
-               var cmd = new CmdCatalogContributing(test_model, test_catalog, test_filter,
+               var cmd = new CmdCatalogContributing(test_model, test_catalog,
                        person_name = "Alexandre Terrasa")
                var res = cmd.init_command
                assert res isa CmdSuccess
@@ -104,7 +104,7 @@ class TestCommandsCatalog
        end
 
        fun test_cmd_catalog_maintaining is test do
-               var cmd = new CmdCatalogMaintaining(test_model, test_catalog, test_filter,
+               var cmd = new CmdCatalogMaintaining(test_model, test_catalog,
                        person_name = "Alexandre Terrasa")
                var res = cmd.init_command
                assert res isa CmdSuccess
index f8e8b18..d9cefa9 100644 (file)
@@ -22,28 +22,28 @@ class TestCommandsGraph
        test
 
        fun test_cmd_uml is test do
-               var cmd = new CmdUML(test_model, test_main, test_filter, mentity_name = "test_prog::Character")
+               var cmd = new CmdUML(test_model, test_main, mentity_name = "test_prog::Character")
                var res = cmd.init_command
                assert res isa CmdSuccess
                assert cmd.uml != null
        end
 
        fun test_cmd_uml_bad_format is test do
-               var cmd = new CmdUML(test_model, test_main, test_filter, mentity_name = "test_prog::Character", format = "foo")
+               var cmd = new CmdUML(test_model, test_main, mentity_name = "test_prog::Character", format = "foo")
                var res = cmd.init_command
                assert res isa ErrorBadGraphFormat
                assert cmd.uml == null
        end
 
        fun test_cmd_uml_not_found is test do
-               var cmd = new CmdUML(test_model, test_main, test_filter, mentity_name = "strength_bonus")
+               var cmd = new CmdUML(test_model, test_main, mentity_name = "strength_bonus")
                var res = cmd.init_command
                assert res isa WarningNoUML
                assert cmd.uml == null
        end
 
        fun test_cmd_inh_graph is test do
-               var cmd = new CmdInheritanceGraph(test_model, test_main, test_filter, mentity_name = "test_prog::Character")
+               var cmd = new CmdInheritanceGraph(test_model, test_main, mentity_name = "test_prog::Character")
                var res = cmd.init_command
                assert res isa CmdSuccess
                assert cmd.graph != null
index e435de2..b009b7f 100644 (file)
@@ -38,7 +38,7 @@ class TestCommandsHttp
 
        fun test_cmd_http_entity is test do
                var req = new_request("/test_prog::Character")
-               var cmd = new CmdEntity(test_model, test_filter)
+               var cmd = new CmdEntity(test_model)
                var res = cmd.http_init(req)
                assert res isa CmdSuccess
                assert cmd.mentity.as(not null).full_name == "test_prog::Character"
@@ -46,7 +46,7 @@ class TestCommandsHttp
 
        fun test_cmd_http_entity_not_found is test do
                var req = new_request("/Characterzzz")
-               var cmd = new CmdEntity(test_model, test_filter)
+               var cmd = new CmdEntity(test_model)
                var res = cmd.http_init(req)
                assert res isa ErrorMEntityNotFound
                assert res.suggestions.first.full_name == "test_prog::Character"
@@ -54,7 +54,7 @@ class TestCommandsHttp
 
        fun test_cmd_http_entity_conflict is test do
                var req = new_request("/+")
-               var cmd = new CmdEntity(test_model, test_filter)
+               var cmd = new CmdEntity(test_model)
                var res = cmd.http_init(req)
                assert res isa ErrorMEntityConflict
                assert res.conflicts.length == 2
@@ -64,7 +64,7 @@ class TestCommandsHttp
 
        fun test_cmd_http_comment is test do
                var req = new_request("/test_prog::Character")
-               var cmd = new CmdComment(test_model, test_filter)
+               var cmd = new CmdComment(test_model)
                var res = cmd.http_init(req)
                assert res isa CmdSuccess
                assert cmd.mdoc != null
@@ -72,7 +72,7 @@ class TestCommandsHttp
 
        fun test_cmd_http_comment_no_mdoc is test do
                var req = new_request("/test_prog::Character?fallback=false")
-               var cmd = new CmdComment(test_model, test_filter)
+               var cmd = new CmdComment(test_model)
                var res = cmd.http_init(req)
                assert res isa WarningNoMDoc
        end
@@ -119,7 +119,7 @@ class TestCommandsHttp
 
        fun test_cmd_http_parents is test do
                var req = new_request("/test_prog::Warrior")
-               var cmd = new CmdParents(test_model, test_main, test_filter)
+               var cmd = new CmdParents(test_model, test_main)
                var res = cmd.http_init(req)
                assert res isa CmdSuccess
                assert cmd.results.as(not null).length == 1
@@ -127,7 +127,7 @@ class TestCommandsHttp
 
        fun test_cmd_http_ancestors is test do
                var req = new_request("/test_prog::Warrior")
-               var cmd = new CmdAncestors(test_model, test_main, test_filter)
+               var cmd = new CmdAncestors(test_model, test_main)
                var res = cmd.http_init(req)
                assert res isa CmdSuccess
                assert cmd.results.as(not null).length == 2
@@ -135,7 +135,7 @@ class TestCommandsHttp
 
        fun test_cmd_http_ancestorsi_without_parents is test do
                var req = new_request("/test_prog::Warrior?parents=false")
-               var cmd = new CmdAncestors(test_model, test_main, test_filter)
+               var cmd = new CmdAncestors(test_model, test_main)
                var res = cmd.http_init(req)
                assert res isa CmdSuccess
                assert cmd.results.as(not null).length == 1
@@ -143,7 +143,7 @@ class TestCommandsHttp
 
        fun test_cmd_http_children is test do
                var req = new_request("/test_prog::Career")
-               var cmd = new CmdChildren(test_model, test_main, test_filter)
+               var cmd = new CmdChildren(test_model, test_main)
                var res = cmd.http_init(req)
                assert res isa CmdSuccess
                assert cmd.results.as(not null).length == 3
@@ -151,7 +151,7 @@ class TestCommandsHttp
 
        fun test_cmd_http_descendants is test do
                var req = new_request("/test_prog::Career?children=false")
-               var cmd = new CmdDescendants(test_model, test_main, test_filter)
+               var cmd = new CmdDescendants(test_model, test_main)
                var res = cmd.http_init(req)
                assert res isa CmdSuccess
                assert cmd.results.as(not null).length == 0
@@ -161,7 +161,7 @@ class TestCommandsHttp
 
        fun test_cmd_http_search is test do
                var req = new_request("/?q=Carer&l=1")
-               var cmd = new CmdSearch(test_model, test_filter)
+               var cmd = new CmdSearch(test_model)
                var res = cmd.http_init(req)
                assert res isa CmdSuccess
                assert cmd.results.as(not null).first.full_name == "test_prog::Career"
@@ -170,7 +170,7 @@ class TestCommandsHttp
 
        fun test_cmd_http_search_no_query is test do
                var req = new_request("/")
-               var cmd = new CmdSearch(test_model, test_filter)
+               var cmd = new CmdSearch(test_model)
                var res = cmd.http_init(req)
                assert res isa ErrorNoQuery
        end
@@ -179,7 +179,7 @@ class TestCommandsHttp
 
        fun test_cmd_http_features is test do
                var req = new_request("/test_prog::Character?l=10")
-               var cmd = new CmdFeatures(test_model, test_filter)
+               var cmd = new CmdFeatures(test_model)
                var res = cmd.http_init(req)
                assert res isa CmdSuccess
                assert cmd.results.as(not null).length == 10
@@ -187,7 +187,7 @@ class TestCommandsHttp
 
        fun test_cmd_http_features_no_features is test do
                var req = new_request("/test_prog$Career$strength_bonus?l=10")
-               var cmd = new CmdFeatures(test_model, test_filter)
+               var cmd = new CmdFeatures(test_model)
                var res = cmd.http_init(req)
                assert res isa WarningNoFeatures
        end
@@ -196,7 +196,7 @@ class TestCommandsHttp
 
        fun test_cmd_http_lin is test do
                var req = new_request("/init?l=10")
-               var cmd = new CmdLinearization(test_model, test_main, test_filter)
+               var cmd = new CmdLinearization(test_model, test_main)
                var res = cmd.http_init(req)
                assert res isa CmdSuccess
                assert cmd.results.as(not null).length == 10
@@ -204,7 +204,7 @@ class TestCommandsHttp
 
        fun test_cmd_http_lin_no_lin is test do
                var req = new_request("/test_prog?l=10")
-               var cmd = new CmdLinearization(test_model, test_main, test_filter)
+               var cmd = new CmdLinearization(test_model, test_main)
                var res = cmd.http_init(req)
                assert res isa WarningNoLinearization
        end
@@ -213,7 +213,7 @@ class TestCommandsHttp
 
        fun test_cmd_http_code is test do
                var req = new_request("/test_prog::Career")
-               var cmd = new CmdEntityCode(test_model, test_builder, test_filter)
+               var cmd = new CmdEntityCode(test_model, test_builder)
                var res = cmd.http_init(req)
                assert res isa CmdSuccess
                assert cmd.node isa AStdClassdef
@@ -222,7 +222,7 @@ class TestCommandsHttp
 
        fun test_cmd_http_code_format is test do
                var req = new_request("/test_prog::Career?format=html")
-               var cmd = new CmdEntityCode(test_model, test_builder, test_filter)
+               var cmd = new CmdEntityCode(test_model, test_builder)
                var res = cmd.http_init(req)
                assert res isa CmdSuccess
                assert cmd.node isa AStdClassdef
@@ -231,7 +231,7 @@ class TestCommandsHttp
 
        fun test_cmd_http_code_no_code is test do
                var req = new_request("/test_prog")
-               var cmd = new CmdEntityCode(test_model, test_builder, test_filter)
+               var cmd = new CmdEntityCode(test_model, test_builder)
                var res = cmd.http_init(req)
                assert res isa WarningNoCode
        end
@@ -240,7 +240,7 @@ class TestCommandsHttp
 
        fun test_cmd_http_results is test do
                var req = new_request("/?kind=modules&l=2")
-               var cmd = new CmdModelEntities(test_model, test_filter, kind = "modules")
+               var cmd = new CmdModelEntities(test_model, kind = "modules")
                var res = cmd.http_init(req)
                assert res isa CmdSuccess
                assert cmd.results.as(not null).length == 2
@@ -248,7 +248,7 @@ class TestCommandsHttp
 
        fun test_cmd_http_results_random is test do
                var req = new_request("/?kind=packages&l=1")
-               var cmd = new CmdRandomEntities(test_model, test_filter, kind = "packages")
+               var cmd = new CmdRandomEntities(test_model, kind = "packages")
                var res = cmd.http_init(req)
                assert res isa CmdSuccess
                assert cmd.results.as(not null).length == 1
@@ -258,7 +258,7 @@ class TestCommandsHttp
 
        fun test_cmd_http_uml is test do
                var req = new_request("/test_prog::Character?format=svg")
-               var cmd = new CmdUML(test_model, test_main, test_filter)
+               var cmd = new CmdUML(test_model, test_main)
                var res = cmd.http_init(req)
                assert res isa CmdSuccess
                assert cmd.uml != null
@@ -267,7 +267,7 @@ class TestCommandsHttp
 
        fun test_cmd_http_uml_not_found is test do
                var req = new_request("/strength_bonus")
-               var cmd = new CmdUML(test_model, test_main, test_filter)
+               var cmd = new CmdUML(test_model, test_main)
                var res = cmd.http_init(req)
                assert res isa WarningNoUML
                assert cmd.format == "dot"
@@ -276,7 +276,7 @@ class TestCommandsHttp
 
        fun test_cmd_http_inh_graph is test do
                var req = new_request("/test_prog::Character?pdepth=1&cdepth=1")
-               var cmd = new CmdInheritanceGraph(test_model, test_main, test_filter)
+               var cmd = new CmdInheritanceGraph(test_model, test_main)
                var res = cmd.http_init(req)
                assert res isa CmdSuccess
                assert cmd.graph != null
@@ -288,7 +288,7 @@ class TestCommandsHttp
 
        fun test_cmd_http_catalog_search is test do
                var req = new_request("/?q=testprog&l=1")
-               var cmd = new CmdCatalogSearch(test_model, test_catalog, test_filter)
+               var cmd = new CmdCatalogSearch(test_model, test_catalog)
                var res = cmd.http_init(req)
                assert res isa CmdSuccess
                assert cmd.results.as(not null).first.full_name == "test_prog"
@@ -298,7 +298,7 @@ class TestCommandsHttp
 
        fun test_cmd_http_catalog_tag is test do
                var req = new_request("/test", "/:tid")
-               var cmd = new CmdCatalogTag(test_model, test_catalog, test_filter)
+               var cmd = new CmdCatalogTag(test_model, test_catalog)
                var res = cmd.http_init(req)
                assert res isa CmdSuccess
                assert cmd.tag == "test"
@@ -307,7 +307,7 @@ class TestCommandsHttp
 
        fun test_cmd_http_catalog_person is test do
                var req = new_request("/Alexandre%20Terrasa", "/:pid")
-               var cmd = new CmdCatalogPerson(test_model, test_catalog, test_filter)
+               var cmd = new CmdCatalogPerson(test_model, test_catalog)
                var res = cmd.http_init(req)
                assert res isa CmdSuccess
                assert cmd.person.as(not null).name == "Alexandre Terrasa"
index 0713979..7f616b4 100644 (file)
@@ -30,13 +30,13 @@ class TestCommandsJson
        # CmdEntity
 
        fun test_cmd_entity is test do
-               var cmd = new CmdEntity(test_model, test_filter, mentity_name = "test_prog::Character")
+               var cmd = new CmdEntity(test_model, mentity_name = "test_prog::Character")
                cmd.init_command
                print_json cmd.to_json
        end
 
        fun test_cmd_comment is test do
-               var cmd = new CmdComment(test_model, test_filter, mentity_name = "test_prog::Character")
+               var cmd = new CmdComment(test_model, mentity_name = "test_prog::Character")
                cmd.init_command
                print_json cmd.to_json
        end
@@ -50,25 +50,25 @@ class TestCommandsJson
        # CmdInheritance
 
        fun test_cmd_parents is test do
-               var cmd = new CmdParents(test_model, test_main, test_filter, mentity_name = "test_prog::Warrior")
+               var cmd = new CmdParents(test_model, test_main, mentity_name = "test_prog::Warrior")
                cmd.init_command
                print_json cmd.to_json
        end
 
        fun test_cmd_ancestors is test do
-               var cmd = new CmdAncestors(test_model, test_main, test_filter, mentity_name = "test_prog::Warrior", parents = false)
+               var cmd = new CmdAncestors(test_model, test_main, mentity_name = "test_prog::Warrior", parents = false)
                cmd.init_command
                print_json cmd.to_json
        end
 
        fun test_cmd_children is test do
-               var cmd = new CmdChildren(test_model, test_main, test_filter, mentity_name = "test_prog::Career")
+               var cmd = new CmdChildren(test_model, test_main, mentity_name = "test_prog::Career")
                cmd.init_command
                print_json cmd.to_json
        end
 
        fun test_cmd_descendants is test do
-               var cmd = new CmdDescendants(test_model, test_main, test_filter, mentity_name = "test_prog::Career")
+               var cmd = new CmdDescendants(test_model, test_main, mentity_name = "test_prog::Career")
                cmd.init_command
                print_json cmd.to_json
        end
@@ -76,7 +76,7 @@ class TestCommandsJson
        # CmdSearch
 
        fun test_cmd_search is test do
-               var cmd = new CmdSearch(test_model, test_filter, query = "Carer", limit = 10)
+               var cmd = new CmdSearch(test_model, query = "Carer", limit = 10)
                cmd.init_command
                print_json cmd.to_json
        end
@@ -84,7 +84,7 @@ class TestCommandsJson
        # CmdFeatures
 
        fun test_cmd_features is test do
-               var cmd = new CmdFeatures(test_model, test_filter, mentity_name = "test_prog::Career")
+               var cmd = new CmdFeatures(test_model, mentity_name = "test_prog::Career")
                cmd.init_command
                print_json cmd.to_json
        end
@@ -92,7 +92,7 @@ class TestCommandsJson
        # CmdLinearization
 
        fun test_cmd_lin is test do
-               var cmd = new CmdLinearization(test_model, test_main, test_filter, mentity_name = "init")
+               var cmd = new CmdLinearization(test_model, test_main, mentity_name = "init")
                cmd.init_command
                print_json cmd.to_json
        end
@@ -100,7 +100,7 @@ class TestCommandsJson
        # CmdModel
 
        fun test_cmd_mentities is test do
-               var cmd = new CmdModelEntities(test_model, test_filter, kind = "modules")
+               var cmd = new CmdModelEntities(test_model, kind = "modules")
                cmd.init_command
                print_json cmd.to_json
        end
@@ -108,25 +108,25 @@ class TestCommandsJson
        # CmdUsage
 
        fun test_cmd_new is test do
-               var cmd = new CmdNew(test_model, test_builder, test_filter, mentity_name = "test_prog::Character")
+               var cmd = new CmdNew(test_model, test_builder, mentity_name = "test_prog::Character")
                cmd.init_command
                print_json cmd.to_json
        end
 
        fun test_cmd_call is test do
-               var cmd = new CmdCall(test_model, test_builder, test_filter, mentity_name = "strength_bonus")
+               var cmd = new CmdCall(test_model, test_builder, mentity_name = "strength_bonus")
                cmd.init_command
                print_json cmd.to_json
        end
 
        fun test_cmd_return is test do
-               var cmd = new CmdReturn(test_model, test_filter, mentity_name = "test_prog::Character")
+               var cmd = new CmdReturn(test_model, mentity_name = "test_prog::Character")
                cmd.init_command
                print_json cmd.to_json
        end
 
        fun test_cmd_param is test do
-               var cmd = new CmdParam(test_model, test_filter, mentity_name = "test_prog::Character")
+               var cmd = new CmdParam(test_model, mentity_name = "test_prog::Character")
                cmd.init_command
                print_json cmd.to_json
        end
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 41bcfe7..d61bde0 100644 (file)
@@ -24,28 +24,28 @@ class TestCommandsModel
        # CmdEntity
 
        fun test_cmd_entity is test do
-               var cmd = new CmdEntity(test_model, test_filter, mentity_name = "test_prog::Character")
+               var cmd = new CmdEntity(test_model, mentity_name = "test_prog::Character")
                var res = cmd.init_command
                assert res isa CmdSuccess
                assert cmd.mentity.as(not null).full_name == "test_prog::Character"
        end
 
        fun test_cmd_entity_not_found is test do
-               var cmd = new CmdEntity(test_model, test_filter, mentity_name = "test_prog::Characterzz")
+               var cmd = new CmdEntity(test_model, mentity_name = "test_prog::Characterzz")
                var res = cmd.init_command
                assert res isa ErrorMEntityNotFound
                assert res.suggestions.first.full_name == "test_prog::Character"
        end
 
        fun test_cmd_entity_conflict is test do
-               var cmd = new CmdEntity(test_model, test_filter, mentity_name = "+")
+               var cmd = new CmdEntity(test_model, mentity_name = "+")
                var res = cmd.init_command
                assert res isa ErrorMEntityConflict
                assert res.conflicts.length == 2
        end
 
        fun test_cmd_entity_no_name is test do
-               var cmd = new CmdEntity(test_model, test_filter)
+               var cmd = new CmdEntity(test_model)
                var res = cmd.init_command
                assert res isa ErrorMEntityNoName
        end
@@ -53,14 +53,14 @@ class TestCommandsModel
        # CmdComment
 
        fun test_cmd_comment is test do
-               var cmd = new CmdComment(test_model, test_filter, mentity_name = "test_prog::Character")
+               var cmd = new CmdComment(test_model, mentity_name = "test_prog::Character")
                var res = cmd.init_command
                assert res isa CmdSuccess
                assert cmd.mdoc != null
        end
 
        fun test_cmd_comment_no_mdoc is test do
-               var cmd = new CmdComment(test_model, test_filter, mentity_name = "test_prog::Character", fallback = false)
+               var cmd = new CmdComment(test_model, mentity_name = "test_prog::Character", fallback = false)
                var res = cmd.init_command
                assert res isa WarningNoMDoc
        end
@@ -68,7 +68,7 @@ class TestCommandsModel
        # CmdLink
 
        fun test_cmd_link is test do
-               var cmd = new CmdEntityLink(test_model, test_filter, mentity_name = "test_prog::Character")
+               var cmd = new CmdEntityLink(test_model, mentity_name = "test_prog::Character")
                var res = cmd.init_command
                assert res isa CmdSuccess
                assert cmd.text == "Character"
@@ -76,7 +76,7 @@ class TestCommandsModel
        end
 
        fun test_cmd_link_with_text is test do
-               var cmd = new CmdEntityLink(test_model, test_filter, mentity_name = "test_prog::Character", text = "foo")
+               var cmd = new CmdEntityLink(test_model, mentity_name = "test_prog::Character", text = "foo")
                var res = cmd.init_command
                assert res isa CmdSuccess
                assert cmd.text == "foo"
@@ -84,7 +84,7 @@ class TestCommandsModel
        end
 
        fun test_cmd_link_with_title is test do
-               var cmd = new CmdEntityLink(test_model, test_filter, mentity_name = "test_prog::Character", title = "bar")
+               var cmd = new CmdEntityLink(test_model, mentity_name = "test_prog::Character", title = "bar")
                var res = cmd.init_command
                assert res isa CmdSuccess
                assert cmd.text == "Character"
@@ -92,7 +92,7 @@ class TestCommandsModel
        end
 
        fun test_cmd_link_with_text_and_title is test do
-               var cmd = new CmdEntityLink(test_model, test_filter, mentity_name = "test_prog::Character",
+               var cmd = new CmdEntityLink(test_model, mentity_name = "test_prog::Character",
                        text = "foo", title = "bar")
                var res = cmd.init_command
                assert res isa CmdSuccess
@@ -103,35 +103,35 @@ class TestCommandsModel
        # CmdInheritance
 
        fun test_cmd_parents is test do
-               var cmd = new CmdParents(test_model, test_main, test_filter, mentity_name = "test_prog::Warrior")
+               var cmd = new CmdParents(test_model, test_main, mentity_name = "test_prog::Warrior")
                var res = cmd.init_command
                assert res isa CmdSuccess
                assert cmd.results.as(not null).length == 1
        end
 
        fun test_cmd_ancestors is test do
-               var cmd = new CmdAncestors(test_model, test_main, test_filter, mentity_name = "test_prog::Warrior")
+               var cmd = new CmdAncestors(test_model, test_main, mentity_name = "test_prog::Warrior")
                var res = cmd.init_command
                assert res isa CmdSuccess
                assert cmd.results.as(not null).length == 2
        end
 
        fun test_cmd_ancestors_without_parents is test do
-               var cmd = new CmdAncestors(test_model, test_main, test_filter, mentity_name = "test_prog::Warrior", parents = false)
+               var cmd = new CmdAncestors(test_model, test_main, mentity_name = "test_prog::Warrior", parents = false)
                var res = cmd.init_command
                assert res isa CmdSuccess
                assert cmd.results.as(not null).length == 1
        end
 
        fun test_cmd_children is test do
-               var cmd = new CmdChildren(test_model, test_main, test_filter, mentity_name = "test_prog::Career")
+               var cmd = new CmdChildren(test_model, test_main, mentity_name = "test_prog::Career")
                var res = cmd.init_command
                assert res isa CmdSuccess
                assert cmd.results.as(not null).length == 3
        end
 
        fun test_cmd_descendants is test do
-               var cmd = new CmdDescendants(test_model, test_main, test_filter, mentity_name = "test_prog::Career", children = false)
+               var cmd = new CmdDescendants(test_model, test_main, mentity_name = "test_prog::Career", children = false)
                var res = cmd.init_command
                assert res isa CmdSuccess
                assert cmd.results.as(not null).length == 0
@@ -140,14 +140,14 @@ class TestCommandsModel
        # CmdSearch
 
        fun test_cmd_search is test do
-               var cmd = new CmdSearch(test_model, test_filter, query = "Carer")
+               var cmd = new CmdSearch(test_model, query = "Carer")
                var res = cmd.init_command
                assert res isa CmdSuccess
                assert cmd.results.as(not null).first.full_name == "test_prog::Career"
        end
 
        fun test_cmd_search_no_query is test do
-               var cmd = new CmdSearch(test_model, test_filter)
+               var cmd = new CmdSearch(test_model)
                var res = cmd.init_command
                assert res isa ErrorNoQuery
        end
@@ -155,14 +155,14 @@ class TestCommandsModel
        # CmdFeatures
 
        fun test_cmd_features is test do
-               var cmd = new CmdFeatures(test_model, test_filter, mentity_name = "test_prog::Career")
+               var cmd = new CmdFeatures(test_model, mentity_name = "test_prog::Career")
                var res = cmd.init_command
                assert res isa CmdSuccess
                assert cmd.results.as(not null).length == 10
        end
 
        fun test_cmd_features_no_features is test do
-               var cmd = new CmdFeatures(test_model, test_filter, mentity_name = "test_prog$Career$strength_bonus")
+               var cmd = new CmdFeatures(test_model, mentity_name = "test_prog$Career$strength_bonus")
                var res = cmd.init_command
                assert res isa WarningNoFeatures
        end
@@ -170,14 +170,14 @@ class TestCommandsModel
        # CmdLinearization
 
        fun test_cmd_lin is test do
-               var cmd = new CmdLinearization(test_model, test_main, test_filter, mentity_name = "init")
+               var cmd = new CmdLinearization(test_model, test_main, mentity_name = "init")
                var res = cmd.init_command
                assert res isa CmdSuccess
                assert cmd.results.as(not null).length == 10
        end
 
        fun test_cmd_lin_no_lin is test do
-               var cmd = new CmdLinearization(test_model, test_main, test_filter, mentity_name = "test_prog")
+               var cmd = new CmdLinearization(test_model, test_main, mentity_name = "test_prog")
                var res = cmd.init_command
                assert res isa WarningNoLinearization
        end
@@ -185,14 +185,14 @@ class TestCommandsModel
        # CmdCode
 
        fun test_cmd_code is test do
-               var cmd = new CmdEntityCode(test_model, test_builder, test_filter, mentity_name = "test_prog::Career")
+               var cmd = new CmdEntityCode(test_model, test_builder, mentity_name = "test_prog::Career")
                var res = cmd.init_command
                assert res isa CmdSuccess
                assert cmd.node isa AStdClassdef
        end
 
        fun test_cmd_code_no_code is test do
-               var cmd = new CmdEntityCode(test_model, test_builder, test_filter, mentity_name = "test_prog")
+               var cmd = new CmdEntityCode(test_model, test_builder, mentity_name = "test_prog")
                var res = cmd.init_command
                assert res isa WarningNoCode
        end
@@ -200,14 +200,14 @@ class TestCommandsModel
        # CmdModel
 
        fun test_cmd_results is test do
-               var cmd = new CmdModelEntities(test_model, test_filter, kind = "modules")
+               var cmd = new CmdModelEntities(test_model, kind = "modules")
                var res = cmd.init_command
                assert res isa CmdSuccess
                assert cmd.results.as(not null).length == 10
        end
 
        fun test_cmd_results_random is test do
-               var cmd = new CmdRandomEntities(test_model, test_filter, kind = "packages")
+               var cmd = new CmdRandomEntities(test_model, kind = "packages")
                var res = cmd.init_command
                assert res isa CmdSuccess
                assert cmd.results.as(not null).length == 2
index 9b34cc8..42f715d 100644 (file)
@@ -25,7 +25,7 @@ class TestCommandsParser
        # CmdEntity
 
        fun test_cmd_parser_comment is test do
-               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog, test_filter)
+               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog)
                var cmd = parser.parse("doc: test_prog::Character")
                assert cmd isa CmdComment
                assert parser.error == null
@@ -193,7 +193,7 @@ class TestCommandsParser
        # CmdSearch
 
        fun test_cmd_parser_search is test do
-               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog, test_filter)
+               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog)
                var cmd = parser.parse("search: Caracter")
                assert cmd isa CmdSearch
                assert parser.error == null
@@ -201,7 +201,7 @@ class TestCommandsParser
        end
 
        fun test_cmd_parser_search_limit is test do
-               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog, test_filter)
+               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog)
                var cmd = parser.parse("search: Caracter | limit: 2")
                assert cmd isa CmdSearch
                assert parser.error == null
@@ -211,7 +211,7 @@ class TestCommandsParser
        # CmdFeatures
 
        fun test_cmd_parser_features is test do
-               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog, test_filter)
+               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog)
                var cmd = parser.parse("defs: test_prog::Character")
                assert cmd isa CmdFeatures
                assert parser.error == null
@@ -219,7 +219,7 @@ class TestCommandsParser
        end
 
        fun test_cmd_parser_features_limit is test do
-               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog, test_filter)
+               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog)
                var cmd = parser.parse("defs: test_prog::Character | limit: 2")
                assert cmd isa CmdFeatures
                assert parser.error == null
@@ -229,7 +229,7 @@ class TestCommandsParser
        # CmdLinearization
 
        fun test_cmd_parser_lin is test do
-               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog, test_filter)
+               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog)
                var cmd = parser.parse("lin: test_prog::Character")
                assert cmd isa CmdLinearization
                assert parser.error == null
@@ -237,7 +237,7 @@ class TestCommandsParser
        end
 
        fun test_cmd_parser_lin_limit is test do
-               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog, test_filter)
+               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog)
                var cmd = parser.parse("lin: test_prog::Character | limit: 2")
                assert cmd isa CmdLinearization
                assert parser.error == null
@@ -247,7 +247,7 @@ class TestCommandsParser
        # CmdCode
 
        fun test_cmd_parser_code is test do
-               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog, test_filter)
+               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog)
                var cmd = parser.parse("code: test_prog::Character")
                assert cmd isa CmdEntityCode
                assert parser.error == null
@@ -257,7 +257,7 @@ class TestCommandsParser
        # CmdModel
 
        fun test_cmd_parser_mentities is test do
-               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog, test_filter)
+               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog)
                var cmd = parser.parse("list: modules")
                assert cmd isa CmdModelEntities
                assert parser.error == null
@@ -265,7 +265,7 @@ class TestCommandsParser
        end
 
        fun test_cmd_parser_results_mentities is test do
-               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog, test_filter)
+               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog)
                var cmd = parser.parse("random: modules")
                assert cmd isa CmdRandomEntities
                assert parser.error == null
@@ -275,7 +275,7 @@ class TestCommandsParser
        # CmdGraph
 
        fun test_cmd_parser_uml is test do
-               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog, test_filter)
+               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog)
                var cmd = parser.parse("uml: test_prog::Career")
                assert cmd isa CmdUML
                assert parser.error == null
@@ -283,7 +283,7 @@ class TestCommandsParser
        end
 
        fun test_cmd_parser_inh_graph is test do
-               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog, test_filter)
+               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog)
                var cmd = parser.parse("graph: test_prog::Career")
                assert cmd isa CmdInheritanceGraph
                assert parser.error == null
@@ -291,7 +291,7 @@ class TestCommandsParser
        end
 
        fun test_cmd_parser_inh_graph_opts is test do
-               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog, test_filter)
+               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog)
                var cmd = parser.parse("graph: test_prog::Career | cdepth: 2, pdepth: 5")
                assert cmd isa CmdInheritanceGraph
                assert parser.error == null
@@ -303,7 +303,7 @@ class TestCommandsParser
        # CmdUsage
 
        fun test_cmd_parser_new is test do
-               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog, test_filter)
+               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog)
                var cmd = parser.parse("new: test_prog::Career")
                assert cmd isa CmdNew
                assert parser.error == null
@@ -311,7 +311,7 @@ class TestCommandsParser
        end
 
        fun test_cmd_parser_call is test do
-               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog, test_filter)
+               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog)
                var cmd = parser.parse("call: strength_bonus")
                assert cmd isa CmdCall
                assert parser.error == null
@@ -319,7 +319,7 @@ class TestCommandsParser
        end
 
        fun test_cmd_parser_return is test do
-               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog, test_filter)
+               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog)
                var cmd = parser.parse("return: test_prog::Career")
                assert cmd isa CmdReturn
                assert parser.error == null
@@ -327,7 +327,7 @@ class TestCommandsParser
        end
 
        fun test_cmd_parser_param is test do
-               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog, test_filter)
+               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog)
                var cmd = parser.parse("param: test_prog::Career")
                assert cmd isa CmdParam
                assert parser.error == null
@@ -337,7 +337,7 @@ class TestCommandsParser
        # CmdCatalog
 
        fun test_parser_catalog_search is test do
-               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog, test_filter)
+               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog)
                var cmd = parser.parse("search: Caracter")
                assert cmd isa CmdSearch
                assert parser.error == null
@@ -345,7 +345,7 @@ class TestCommandsParser
        end
 
        fun test_cmd_parser_catalog_packages is test do
-               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog, test_filter)
+               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog)
                var cmd = parser.parse("catalog:")
                assert cmd isa CmdCatalogPackages
                assert parser.error == null
@@ -353,7 +353,7 @@ class TestCommandsParser
        end
 
        fun test_cmd_parser_catalog_stats is test do
-               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog, test_filter)
+               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog)
                var cmd = parser.parse("stats:")
                assert cmd isa CmdCatalogStats
                assert parser.error == null
@@ -361,7 +361,7 @@ class TestCommandsParser
        end
 
        fun test_cmd_parser_catalog_tags is test do
-               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog, test_filter)
+               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog)
                var cmd = parser.parse("tags:")
                assert cmd isa CmdCatalogTags
                assert parser.error == null
@@ -369,7 +369,7 @@ class TestCommandsParser
        end
 
        fun test_cmd_parser_catalog_tag is test do
-               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog, test_filter)
+               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog)
                var cmd = parser.parse("tag: test")
                assert cmd isa CmdCatalogTag
                assert parser.error == null
@@ -378,7 +378,7 @@ class TestCommandsParser
        end
 
        fun test_cmd_parser_catalog_person is test do
-               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog, test_filter)
+               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog)
                var cmd = parser.parse("person: Alexandre Terrasa")
                assert cmd isa CmdCatalogPerson
                assert parser.error == null
@@ -386,7 +386,7 @@ class TestCommandsParser
        end
 
        fun test_cmd_parser_catalog_contributing is test do
-               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog, test_filter)
+               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog)
                var cmd = parser.parse("contrib: Alexandre Terrasa")
                assert cmd isa CmdCatalogContributing
                assert parser.error == null
@@ -395,7 +395,7 @@ class TestCommandsParser
        end
 
        fun test_cmd_parser_catalog_maintaining is test do
-               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog, test_filter)
+               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog)
                var cmd = parser.parse("maintain: Alexandre Terrasa")
                assert cmd isa CmdCatalogMaintaining
                assert parser.error == null
index 13c9680..02a4028 100644 (file)
@@ -22,40 +22,40 @@ class TestCommandsUsage
        test
 
        fun test_cmd_new is test do
-               var cmd = new CmdNew(test_model, test_builder, test_filter, mentity_name = "test_prog::Character")
+               var cmd = new CmdNew(test_model, test_builder, mentity_name = "test_prog::Character")
                var res = cmd.init_command
                assert res isa CmdSuccess
                assert cmd.results != null
        end
 
        fun test_cmd_new_not_class is test do
-               var cmd = new CmdNew(test_model, test_builder, test_filter, mentity_name = "strength_bonus")
+               var cmd = new CmdNew(test_model, test_builder, mentity_name = "strength_bonus")
                var res = cmd.init_command
                assert res isa ErrorNotClass
        end
 
        fun test_cmd_call is test do
-               var cmd = new CmdCall(test_model, test_builder, test_filter, mentity_name = "strength_bonus")
+               var cmd = new CmdCall(test_model, test_builder, mentity_name = "strength_bonus")
                var res = cmd.init_command
                assert res isa CmdSuccess
                assert cmd.results != null
        end
 
        fun test_cmd_call_not_prop is test do
-               var cmd = new CmdCall(test_model, test_builder, test_filter, mentity_name = "test_prog::Character")
+               var cmd = new CmdCall(test_model, test_builder, mentity_name = "test_prog::Character")
                var res = cmd.init_command
                assert res isa ErrorNotProperty
        end
 
        fun test_cmd_return is test do
-               var cmd = new CmdReturn(test_model, test_filter, mentity_name = "test_prog::Character")
+               var cmd = new CmdReturn(test_model, mentity_name = "test_prog::Character")
                var res = cmd.init_command
                assert res isa CmdSuccess
                assert cmd.results != null
        end
 
        fun test_cmd_param is test do
-               var cmd = new CmdParam(test_model, test_filter, mentity_name = "test_prog::Character")
+               var cmd = new CmdParam(test_model, mentity_name = "test_prog::Character")
                var res = cmd.init_command
                assert res isa CmdSuccess
                assert cmd.results != null