Skip to content

Commit ff1f908

Browse files
committed
Make some tests more stable by not checking for order of solutions
1 parent 012d83b commit ff1f908

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

test/algorithms/solvers.jl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
]
2323
rat_sols = Vector{QQFieldElem}[[1, 0, 0, 0], [1//3, 0, 0, 1//3]]
2424

25-
@test sols == real_solutions(I)
26-
@test inter_sols == real_solutions(I, interval=true)
27-
@test rat_sols == rational_solutions(I)
28-
@test I.real_sols == real_solutions(I)
25+
@test issetequal(sols, real_solutions(I))
26+
@test issetequal(inter_sols, real_solutions(I, interval=true))
27+
@test issetequal(rat_sols, rational_solutions(I))
28+
@test issetequal(I.real_sols, real_solutions(I))
2929
@test iszero(I.dim)
3030

3131
C, x = polynomial_ring(QQ, "x")
@@ -69,16 +69,16 @@
6969
I = Ideal([R(0)])
7070
@test_throws ErrorException real_solutions(I)
7171
I = Ideal([x-1,y+2,R(0)])
72-
@test sort(real_solutions(I)) == sort(Vector{QQFieldElem}[[1, -2]])
72+
@test issetequal(real_solutions(I), Vector{QQFieldElem}[[1, -2]])
7373

7474
# check variable permutation
7575
I = Ideal([x^2-1, y])
7676
sols = Vector{QQFieldElem}[
7777
[-1, 0],
7878
[1, 0]
7979
]
80-
@test sort(sols) == sort(real_solutions(I))
80+
@test issetequal(sols, real_solutions(I))
8181

8282
I = Ideal([x^2-1, y^2])
83-
@test sort(sols) == sort(real_solutions(I))
83+
@test issetequal(sols, real_solutions(I))
8484
end

0 commit comments

Comments
 (0)