Skip to content

Commit

Permalink
Add basic conformance tests for is_irreducible
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin committed Jan 29, 2025
1 parent 070ea63 commit 8331c71
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions ext/TestExt/Rings-conformance-tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,12 @@ function ConformanceTests.test_Ring_interface(R::AbstractAlgebra.Ring; reps = 50
@test B == b
end
end

@testset "Basic properties" begin
@test !is_irreducible(zero(R))
@test !is_irreducible(one(R))
end

end

return nothing
Expand Down Expand Up @@ -474,6 +480,17 @@ function ConformanceTests.test_Poly_interface(Rx::AbstractAlgebra.PolyRing; reps
@test is_monic(a) == isone(leading_coefficient(a))
end
end

@testset "Basic properties" begin
try
flag = is_irreducible(x)
@test flag || is_trivial(R)
catch e
if !(e isa NotImplementedError)
rethrow(e)
end
end
end
end

return nothing
Expand Down

0 comments on commit 8331c71

Please sign in to comment.