update tests for show for SLn, Spn

This commit is contained in:
Marek Kaluba 2023-03-15 18:28:10 +01:00
parent 46c95dbb83
commit b52de81e06
No known key found for this signature in database
GPG Key ID: 8BF1A3855328FC15
1 changed files with 16 additions and 10 deletions

View File

@ -7,7 +7,7 @@ using Groups.MatrixGroups
S = gens(SL3Z)
union!(S, inv.(S))
_, sizes = Groups.wlmetric_ball(S, radius=4)
_, sizes = Groups.wlmetric_ball(S; radius = 4)
@test sizes == [13, 121, 883, 5455]
@ -20,9 +20,9 @@ using Groups.MatrixGroups
S = [w, r, s]
S = unique([S; inv.(S)])
_, sizes = Groups.wlmetric_ball(S, radius=4)
_, sizes = Groups.wlmetric_ball(S; radius = 4)
@test sizes == [7, 33, 141, 561]
_, sizes = Groups.wlmetric_ball_serial(S, radius=4)
_, sizes = Groups.wlmetric_ball_serial(S; radius = 4)
@test sizes == [7, 33, 141, 561]
Logging.with_logger(Logging.NullLogger()) do
@ -35,15 +35,18 @@ using Groups.MatrixGroups
end
end
x = w * inv(w) * r
@test length(word(x)) == 5
@test size(x) == (3, 3)
@test eltype(x) == Int8
@test contains(sprint(print, SL3Z), "special linear group of 3×3")
@test contains(sprint(show, MIME"text/plain"(), x), "SL{3,Int8} matrix:")
@test contains(sprint(show, SL3Z), "SL{3,Int8}")
@test contains(
sprint(show, MIME"text/plain"(), SL3Z),
"special linear group",
)
@test contains(sprint(show, MIME"text/plain"(), x), "∈ SL{3,Int8}")
@test sprint(print, x) isa String
@test length(word(x)) == 3
@ -62,8 +65,6 @@ using Groups.MatrixGroups
end
end
@test contains(sprint(print, Sp6), "group of 6×6 symplectic matrices")
x = gens(Sp6, 1)
x *= inv(x) * gens(Sp6, 2)
@ -71,13 +72,18 @@ using Groups.MatrixGroups
@test size(x) == (6, 6)
@test eltype(x) == Int8
@test contains(sprint(show, MIME"text/plain"(), x), "6×6 symplectic matrix:")
@test contains(sprint(show, Sp6), "Sp{6,Int8}")
@test contains(
sprint(show, MIME"text/plain"(), Sp6),
"group of 6×6 symplectic matrices",
)
@test contains(sprint(show, MIME"text/plain"(), x), "∈ Sp{6,Int8}")
@test sprint(print, x) isa String
@test length(word(x)) == 1
for g in gens(Sp6)
@test MatrixGroups.issymplectic(MatrixGroups.matrix_repr(g))
@test MatrixGroups.issymplectic(MatrixGroups.matrix(g))
end
end
end