diff --git a/Project.toml b/Project.toml index fbc8acd43..0f0d7db87 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "Singular" uuid = "bcd08a7b-43d2-5ff7-b6d4-c458787f915c" -version = "0.5.3" +version = "0.5.4" [deps] AbstractAlgebra = "c3fe647b-3220-5bb0-a1ea-a7954cac585d" @@ -17,9 +17,9 @@ lib4ti2_jll = "1493ae25-0f90-5c0e-a06c-8c5077d6d66f" libsingular_julia_jll = "ae4fbd8f-ecdb-54f8-bbce-35570499b30e" [compat] -AbstractAlgebra = "0.17.0" +AbstractAlgebra = "0.18.0" CxxWrap = "0.11" -Nemo = "0.23.0" +Nemo = "0.24.0" RandomExtensions = "0.4.2" Singular_jll = "~402.000.102" julia = "1.3" diff --git a/test/poly/spoly-test.jl b/test/poly/spoly-test.jl index d0776a167..4fd92a93f 100644 --- a/test/poly/spoly-test.jl +++ b/test/poly/spoly-test.jl @@ -516,3 +516,24 @@ end @test_throws Exception div(R(), R()) @test !iszero(std(Ideal(R, R(1)))) end + +@testset "spoly.to_univariate" begin + + touni = Singular.AbstractAlgebra.to_univariate + + S, t = Singular.AbstractAlgebra.PolynomialRing(Singular.QQ, "t") + + R,(x,y) = PolynomialRing(QQ, ["x", "y"], ordering=:deglex) + @test touni(S, 0*x) == zero(S) + @test touni(S, 1+0*x) == one(S) + @test touni(S, y+2*y^2+3*y^3) == t+2*t^2+3*t^3 + @test touni(S, x+2*x^2+3*x^3) == t+2*t^2+3*t^3 + @test_throws Exception touni(S, (1+x)*(1+y)) + + R,(x,y) = PolynomialRing(QQ, ["x", "y"], ordering=:neglex) + @test touni(S, 0*x) == zero(S) + @test touni(S, 1+0*x) == one(S) + @test touni(S, (1+2*y)^6) == (1+2*t)^6 + @test touni(S, (1+2*x)^6) == (1+2*t)^6 + @test_throws Exception touni(S, (1+x)*(1+y)) +end