Skip to content

Commit 069c453

Browse files
Lilith HafnerLilith Hafner
authored andcommitted
accept that invalid lt continues to work
1 parent 5657e5f commit 069c453

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/sorting.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -752,9 +752,10 @@ end
752752
for alg in safe_algs
753753
@test sort(1:n, alg=alg, lt = (i,j) -> v[i]<=v[j]) == perm
754754
end
755-
# Broken by the introduction of BracketedSort in #52006 which is unstable
756-
@test_broken partialsort(1:n, 172, lt = (i,j) -> v[i]<=v[j]) == perm[172]
757-
@test_broken partialsort(1:n, 315:415, lt = (i,j) -> v[i]<=v[j]) == perm[315:415]
755+
# This could easily break with minor heuristic adjustments
756+
# because partialsort is not even guaranteed to be stable:
757+
@test partialsort(1:n, 172, lt = (i,j) -> v[i]<=v[j]) == perm[172]
758+
@test partialsort(1:n, 315:415, lt = (i,j) -> v[i]<=v[j]) == perm[315:415]
758759

759760
# lt can be very poorly behaved and sort will still permute its input in some way.
760761
for alg in safe_algs

0 commit comments

Comments
 (0)