diff --git a/Project.toml b/Project.toml index 285de98..380cecb 100644 --- a/Project.toml +++ b/Project.toml @@ -8,6 +8,7 @@ Folds = "41a02a25-b8f0-4f67-bc48-60067656b558" GroupsCore = "d5909c97-4eac-4ecc-a3dc-fdd0858a4120" KnuthBendix = "c2604015-7b3d-4a30-8a26-9074551ec60a" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" +Logging = "56ddb016-857b-54e1-b83d-db4d58db5568" OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" PermutationGroups = "8bc5a954-2dfc-11e9-10e6-cd969bffa420" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" diff --git a/src/Groups.jl b/src/Groups.jl index 1ccf667..7c97e77 100644 --- a/src/Groups.jl +++ b/src/Groups.jl @@ -1,6 +1,7 @@ module Groups import Folds +import Logging using GroupsCore import GroupsCore.Random diff --git a/src/aut_groups/sautFn.jl b/src/aut_groups/sautFn.jl index d7b0bd1..4e86a37 100644 --- a/src/aut_groups/sautFn.jl +++ b/src/aut_groups/sautFn.jl @@ -10,7 +10,10 @@ function SpecialAutomorphismGroup(F::FreeGroup; ordering = KnuthBendix.LenLex, k maxrules = 1000*n rws = KnuthBendix.RewritingSystem(rels, ordering(A)) - KnuthBendix.knuthbendix!(rws; maxrules=maxrules, kwargs...) + Logging.with_logger(Logging.NullLogger()) do + # the rws is not confluent, let's suppress warning about it + KnuthBendix.knuthbendix!(rws; maxrules=maxrules, kwargs...) + end return AutomorphismGroup(F, S, rws, ntuple(i -> gens(F, i), n)) end diff --git a/test/AutFn.jl b/test/AutFn.jl index 47f09e3..f7e18be 100644 --- a/test/AutFn.jl +++ b/test/AutFn.jl @@ -176,12 +176,13 @@ ) end - @testset "GroupsCore conformance" begin - test_Group_interface(A) - g = A(rand(1:length(alphabet(A)), 10)) - h = A(rand(1:length(alphabet(A)), 10)) + Logging.with_logger(Logging.NullLogger()) do + @testset "GroupsCore conformance" begin + test_Group_interface(A) + g = A(rand(1:length(alphabet(A)), 10)) + h = A(rand(1:length(alphabet(A)), 10)) - test_GroupElement_interface(g, h) + test_GroupElement_interface(g, h) + end end - end diff --git a/test/fp_groups.jl b/test/fp_groups.jl index 0fb5b1e..e06f165 100644 --- a/test/fp_groups.jl +++ b/test/fp_groups.jl @@ -54,9 +54,14 @@ Groups.normalform!(h) @test h == H([5]) - @testset "GroupsCore conformance: H" begin - test_Group_interface(H) - test_GroupElement_interface(rand(H, 2)...) - end + @test_logs (:warn, "using generic isfiniteorder(::AbstractFPGroupElement): the returned `false` might be wrong") isfiniteorder(h) + @test_logs (:warn, "using generic isfinite(::AbstractFPGroup): the returned `false` might be wrong") isfinite(H) + + Logging.with_logger(Logging.NullLogger()) do + @testset "GroupsCore conformance: H" begin + test_Group_interface(H) + test_GroupElement_interface(rand(H, 2)...) + end + end end diff --git a/test/matrix_groups.jl b/test/matrix_groups.jl index d047575..fb13d6f 100644 --- a/test/matrix_groups.jl +++ b/test/matrix_groups.jl @@ -23,12 +23,14 @@ using Groups.MatrixGroups _, sizes = Groups.wlmetric_ball_serial(S, radius=4); @test sizes == [7, 33, 141, 561] - @testset "GroupsCore conformance" begin - test_Group_interface(SL3Z) - g = A(rand(1:length(alphabet(SL3Z)), 10)) - h = A(rand(1:length(alphabet(SL3Z)), 10)) + Logging.with_logger(Logging.NullLogger()) do + @testset "GroupsCore conformance" begin + test_Group_interface(SL3Z) + g = SL3Z(rand(1:length(alphabet(SL3Z)), 10)) + h = SL3Z(rand(1:length(alphabet(SL3Z)), 10)) - test_GroupElement_interface(g, h) + test_GroupElement_interface(g, h) + end end end end diff --git a/test/runtests.jl b/test/runtests.jl index 90ca83d..fabfb6e 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -2,6 +2,8 @@ using Test using Groups using PermutationGroups +import Logging + import KnuthBendix: Word using GroupsCore