From 4b3ed0ed16f912e7f2b56cdfda56fe1525bf661d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20G=C3=B6ttgens?= Date: Fri, 26 Jan 2024 13:52:19 +0100 Subject: [PATCH] Fix casing in `show(::AlgClosure)` (#3249) --- src/Rings/AlgClosureFp.jl | 5 ++++- test/Rings/AlgClosureFp.jl | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Rings/AlgClosureFp.jl b/src/Rings/AlgClosureFp.jl index 47ab9c50ae90..4a797905770d 100644 --- a/src/Rings/AlgClosureFp.jl +++ b/src/Rings/AlgClosureFp.jl @@ -14,6 +14,8 @@ using ..Oscar import Base: +, -, *, //, ==, deepcopy_internal, hash, isone, iszero, one, parent, show, zero +import ..Oscar.AbstractAlgebra: pretty, Lowercase + import ..Oscar: base_field, base_ring, characteristic, data, degree, divexact, elem_type, embedding, has_preimage, IntegerUnion, is_unit, map_entries, minpoly, parent_type, promote_rule, roots @@ -28,7 +30,8 @@ struct AlgClosure{T} <: AbstractAlgebra.Field end function show(io::IO, A::AlgClosure) - print(io, "Algebraic Closure of $(A.k)") + io = pretty(io) + print(io, "Algebraic Closure of ", Lowercase(), A.k) end base_field(A::AlgClosure) = A.k diff --git a/test/Rings/AlgClosureFp.jl b/test/Rings/AlgClosureFp.jl index 68b9db49bd19..47795e692be4 100644 --- a/test/Rings/AlgClosureFp.jl +++ b/test/Rings/AlgClosureFp.jl @@ -54,7 +54,7 @@ end @testset "Printing for $F" for F in [GF(3, 1), Nemo.Native.GF(3, 1)] K = algebraic_closure(F) - @test sprint(show, "text/plain", K) == "Algebraic Closure of Finite field of degree 1 over GF(3)" + @test sprint(show, "text/plain", K) == "Algebraic Closure of finite field of degree 1 over GF(3)" for x in F @test sprint(show, "text/plain", K(x)) == sprint(show, "text/plain", x)