Skip to content

Commit

Permalink
format test/fp_groups.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
kalmarek committed May 29, 2023
1 parent eacb32a commit 3260e66
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions test/fp_groups.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
G = FPGroup(F, [a * b => b * a, a * c => c * a, b * c => c * b])

@test G isa FPGroup
@test sprint(show, G) == "⟨ a b c | \n\t a*b => b*a a*c => c*a b*c => c*b ⟩"
@test sprint(show, G) ==
"⟨ a b c | \n\t a*b => b*a a*c => c*a b*c => c*b ⟩"
@test rand(G) isa FPGroupElement

f = a * c * b
Expand All @@ -40,23 +41,29 @@
end

# quotient of G
H = FPGroup(G, [aG^2 => cG, bG * cG => aG], max_rules=200)
H = FPGroup(G, [aG^2 => cG, bG * cG => aG]; max_rules = 200)

h = H(word(g))

@test h isa FPGroupElement
@test_throws AssertionError h == g
@test_throws MethodError h * g

H′ = FPGroup(G, [aG^2 => cG, bG * cG => aG], max_rules=200)
H′ = FPGroup(G, [aG^2 => cG, bG * cG => aG]; max_rules = 200)
@test_throws AssertionError one(H) == one(H′)

Groups.normalform!(h)
@test h == H([5])

@test_logs (:warn, "using generic isfiniteorder(::AbstractFPGroupElement): the returned `false` might be wrong") isfiniteorder(h)
@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)
@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
Expand Down

0 comments on commit 3260e66

Please sign in to comment.