Skip to content

Commit e048a95

Browse files
committed
adds test for qq interface with nemo
1 parent 6421f14 commit e048a95

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

test/interfaces/nemo.jl

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,19 @@
99
cmp = (Int32[1], BigInt[1], Int32[1, 0], 1)
1010
@test AlgebraicSolving._convert_to_msolve(I.gens) == cmp
1111
for _GF in [GF, AlgebraicSolving.Nemo.Native.GF]
12-
R, (x,y,z) = polynomial_ring(_GF(2147483659),["x","y","z"], internal_ordering=:degrevlex)
13-
F = [x^2+1-3, x*y-z, x*z^2-3*y^2]
14-
# prime is bigger than 2^31, should throw an error
15-
@test_throws ErrorException AlgebraicSolving._convert_to_msolve(F)
16-
R, (x,y,z) = polynomial_ring(_GF(101),["x","y","z"], internal_ordering=:degrevlex)
17-
F = [x^2+1-3, x*y-z, x*z^2-3*y^2]
18-
res = AlgebraicSolving._convert_to_msolve(F)
19-
@test AlgebraicSolving._convert_finite_field_array_to_abstract_algebra(Int32(3), res[1], res[2], res[3], R) == F
12+
R, (x,y,z) = polynomial_ring(_GF(2147483659),["x","y","z"], internal_ordering=:degrevlex)
13+
F = [x^2+1-3, x*y-z, x*z^2-3*y^2]
14+
# prime is bigger than 2^31, should throw an error
15+
@test_throws ErrorException AlgebraicSolving._convert_to_msolve(F)
16+
R, (x,y,z) = polynomial_ring(_GF(101),["x","y","z"], internal_ordering=:degrevlex)
17+
F = [x^2+1-3, x*y-z, x*z^2-3*y^2]
18+
@show F
19+
res = AlgebraicSolving._convert_to_msolve(F)
20+
@test AlgebraicSolving._convert_finite_field_array_to_abstract_algebra(Int32(3), res[1], res[2], res[3], R) == F
2021
end
22+
R, (x,y,z) = polynomial_ring(QQ,["x","y","z"], internal_ordering=:degrevlex)
23+
F = [x^2+1-3, x*y-z, x*z^2-3*y^2]
24+
res = AlgebraicSolving._convert_to_msolve(F)
25+
res_qq =AlgebraicSolving.QQFieldElem[res[2][i] for i in 1:2:length(res[2])]
26+
@test AlgebraicSolving._convert_rational_array_to_abstract_algebra(Int32(3), res[1], res_qq, res[3], R) == F
2127
end

0 commit comments

Comments
 (0)