Skip to content

Commit 256d1ff

Browse files
committed
Change extra tests to not use all presorted inputs
1 parent 47722cc commit 256d1ff

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/runtests.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,9 @@ for T in (Float64, Int, UInt8)
123123
for alg in stable_algorithms
124124
for ord in [Base.Order.By(identity), Base.Order.By(_ -> 0), Base.Order.By(Base.Fix2(÷, 100))]
125125
for n in vcat(0:31, 40:11:100, 110:51:1000)
126-
v = sort(rand(T, n))
127-
@test v == sort(v; alg=alg, order=ord)
126+
v = rand(T, n)
127+
# use MergeSort to guarantee stable sorting in Julia 1.0
128+
@test sort(v, alg=alg, order=ord) == sort(v, alg=MergeSort, order=ord)
128129
end
129130
end
130131
end

0 commit comments

Comments
 (0)