From 6eb76a28325ccc16d8b43fa9412702d285f5e8e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20G=C3=B6ttgens?= Date: Tue, 19 Nov 2024 11:02:03 +0100 Subject: [PATCH] Add some printing tests --- test/AlgAss/AlgGrp.jl | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/test/AlgAss/AlgGrp.jl b/test/AlgAss/AlgGrp.jl index e1946d9c1a..3413ff06e0 100644 --- a/test/AlgAss/AlgGrp.jl +++ b/test/AlgAss/AlgGrp.jl @@ -1,7 +1,8 @@ @testset "Group algebras" begin G = small_group(8, 4) A = GroupAlgebra(QQ, G) - + @test sprint(show, MIME"text/plain"(), A) isa String + @test sprint(show, A) isa String @testset "Regular matrix algebra" begin B, BtoA = Hecke.regular_matrix_algebra(A) @@ -92,6 +93,8 @@ QG = Hecke._group_algebra(QQ, G; sparse = true, cached = false) @test dim(QG) == factorial(10) #@test !is_commutative(QG) # needs https://github.com/Nemocas/AbstractAlgebra.jl/pull/1907 + @test sprint(show, MIME"text/plain"(), QG) isa String + @test sprint(show, QG) isa String for i in 1:10 a = rand(G) b = rand(G) @@ -112,6 +115,8 @@ QG = Hecke._group_algebra(QQ, G; sparse = true, cached = false) @test dim(QG) == 2 * 3 * 5000 @test is_commutative(QG) + @test sprint(show, MIME"text/plain"(), QG) isa String + @test sprint(show, QG) isa String for i in 1:10 a = rand(G) b = rand(G) @@ -126,4 +131,12 @@ @test (aa + bb)^2 == QG(a)^2 + cc + dd + QG(b)^2 end end + + let + G = abelian_group([2, 3, 0]) + QG = Hecke._group_algebra(QQ, G; sparse = true, cached = false) + @test is_commutative(QG) + @test sprint(show, MIME"text/plain"(), QG) isa String + @test sprint(show, QG) isa String + end end