From 60b39e0db70091d419732c29c11c3ef9720a18ce Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sun, 20 Oct 2024 23:25:38 +0200 Subject: [PATCH] WIP --- test/Rings-conformance-tests.jl | 46 +++++++++++++++++---------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/test/Rings-conformance-tests.jl b/test/Rings-conformance-tests.jl index 32eded866e..e664e6fd5c 100644 --- a/test/Rings-conformance-tests.jl +++ b/test/Rings-conformance-tests.jl @@ -329,28 +329,30 @@ function test_NCRing_interface(R::AbstractAlgebra.NCRing; reps = 50) end end - @testset "Adhoc operations with $S" for S in adhoc_partner_rings(R) - s0 = zero(S) - r0 = zero(R) - s1 = one(S) - r1 = one(R) - for i in 1:reps - s2 = test_elem(S) - r2 = R(s2) - x = test_elem(R) - - for (r,s) in ((s0, r0), (s1, r1), (s2, r2)) - @test equality(r, s) - @test equality(s, r) - - @test equality(x + s, x + r) - @test equality(s + x, r + x) - - @test equality(x - s, x - r) - @test equality(s - x, r - x) - - @test equality(x * s, x * r) - @test equality(s * x, r * x) + if is_exact_type(T) + @testset "Adhoc operations with $S" for S in adhoc_partner_rings(R) + s0 = zero(S) + r0 = zero(R) + s1 = one(S) + r1 = one(R) + for i in 1:reps + s2 = test_elem(S) + r2 = R(s2) + x = test_elem(R) + + for (r,s) in ((s0, r0), (s1, r1), (s2, r2)) + @test equality(r, s) + @test equality(s, r) + + @test equality(x + s, x + r) + @test equality(s + x, r + x) + + @test equality(x - s, x - r) + @test equality(s - x, r - x) + + @test equality(x * s, x * r) + @test equality(s * x, r * x) + end end end end