Skip to content

Commit 8331c71

Browse files
committed
Add basic conformance tests for is_irreducible
1 parent 070ea63 commit 8331c71

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

ext/TestExt/Rings-conformance-tests.jl

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,12 @@ function ConformanceTests.test_Ring_interface(R::AbstractAlgebra.Ring; reps = 50
277277
@test B == b
278278
end
279279
end
280+
281+
@testset "Basic properties" begin
282+
@test !is_irreducible(zero(R))
283+
@test !is_irreducible(one(R))
284+
end
285+
280286
end
281287

282288
return nothing
@@ -474,6 +480,17 @@ function ConformanceTests.test_Poly_interface(Rx::AbstractAlgebra.PolyRing; reps
474480
@test is_monic(a) == isone(leading_coefficient(a))
475481
end
476482
end
483+
484+
@testset "Basic properties" begin
485+
try
486+
flag = is_irreducible(x)
487+
@test flag || is_trivial(R)
488+
catch e
489+
if !(e isa NotImplementedError)
490+
rethrow(e)
491+
end
492+
end
493+
end
477494
end
478495

479496
return nothing

0 commit comments

Comments
 (0)