Skip to content

Commit

Permalink
simple test
Browse files Browse the repository at this point in the history
  • Loading branch information
hannes14 committed Feb 20, 2024
1 parent ef5a760 commit 9cf1f63
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/poly/poly.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ export ordering_lp, ordering_ip, ordering_dp, ordering_Dp, ordering_wp, ordering
parent(p::SPolyUnion) = p.parent

base_ring(R::PolyRing{T}) where T <: Nemo.RingElem = R.base_ring::parent_type(T)
base_ring(R::PolyRing{N_Field{T}}) where T <: Nemo.RingElem = R.base_ring::parent_type(T)
base_ring(R::PolyRing{N_Ring{T}}) where T <: Nemo.RingElem = R.base_ring::parent_type(T)

base_ring(p::spoly) = base_ring(parent(p))

Expand Down
8 changes: 8 additions & 0 deletions test/caller-test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -249,3 +249,11 @@ end
@test Singular.libSingular.random() == 16807
@test Singular.libSingular.random() == 282475249
end

@testset "Nemo coeffs" begin
import Pkg; Pkg.add("Nemo")
F = Nemo.fraction_field(Nemo.polynomial_ring(Nemo.ZZ)[1])
R, x = Singular.polynomial_ring(F, [:x])
S = Singular.create_ring_from_singular_ring(Singular.libSingular.rCopy(R.ptr))
@test R.base_ring == S.base_ring
end

0 comments on commit 9cf1f63

Please sign in to comment.