Skip to content

Commit a275ce6

Browse files
committed
Add basic conformance tests for is_irreducible
1 parent 6be03b7 commit a275ce6

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

test/Rings-conformance-tests.jl

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,12 @@ function test_Ring_interface(R::AbstractAlgebra.Ring; reps = 50)
528528
@test B == b
529529
end
530530
end
531+
532+
@testset "Basic properties" begin
533+
@test !is_irreducible(zero(R))
534+
@test !is_irreducible(one(R))
535+
end
536+
531537
end
532538

533539
return nothing
@@ -731,6 +737,17 @@ function test_Poly_interface(Rx::AbstractAlgebra.PolyRing; reps = 30)
731737
@test is_monic(a) == isone(leading_coefficient(a))
732738
end
733739
end
740+
741+
@testset "Basic properties" begin
742+
try
743+
flag = is_irreducible(x)
744+
@test flag || is_trivial(R)
745+
catch e
746+
if !(e isa NotImplementedError)
747+
rethrow(e)
748+
end
749+
end
750+
end
734751
end
735752

736753
return nothing

0 commit comments

Comments
 (0)