Skip to content

Commit 288c36b

Browse files
committed
adds test for variable permutation
1 parent 301f388 commit 288c36b

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

test/algorithms/solvers.jl

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
@test sols == real_solutions(I)
1818
@test rat_sols == rational_solutions(I)
1919
@test I.real_sols == real_solutions(I)
20-
20+
2121
C, x = polynomial_ring(QQ, "x")
2222
elim = 128304*x^8 - 93312*x^7 + 15552*x^6 + 3144*x^5 - 1120*x^4 + 36*x^3 + 15*x^2 - x
2323
denom = 1026432*x^7 - 653184*x^6 + 93312*x^5 + 15720*x^4 - 4480*x^3 + 108*x^2 + 30*x - 1
@@ -50,4 +50,13 @@
5050
I = Ideal([x1^2-x2, x1*x3, x2-12])
5151
@test_throws ErrorException real_solutions(I)
5252
@test_throws ErrorException rational_solutions(I)
53+
54+
# check variable permutation
55+
R, (x, y) = polynomial_ring(QQ,["x","y"])
56+
I = Ideal([x^2-1, y])
57+
sols = Vector{QQFieldElem}[
58+
[-1, 0],
59+
[1, 0]
60+
]
61+
@test sols == real_solutions(I)
5362
end

0 commit comments

Comments
 (0)