Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Lilith Hafner authored and Lilith Hafner committed Jul 19, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 1cb2c2b commit 9942028
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/sorting.jl
Original file line number Diff line number Diff line change
@@ -723,6 +723,14 @@ end
end
@test partialsort(v, 172, lt = (x,y) -> rand([false, true])) 1:5
@test all(partialsort(v, 315:415, lt = (x,y) -> rand([false, true])) .∈ (1:5,))

# issue #32675
k = [38, 18, 38, 38, 3, 37, 26, 26, 6, 29, 38, 36, 38, 1, 38, 36, 38, 38, 38, 36, 36,
36, 28, 34, 35, 38, 25, 20, 38, 1, 1, 5, 38, 38, 3, 34, 16, 38, 4, 10, 35, 37, 38,
38, 2, 38, 25, 35, 38, 1, 35, 36, 20, 33, 36, 18, 38, 1, 24, 4, 38, 18, 12, 38, 34,
35, 36, 38, 26, 31, 36, 38, 38, 30, 36, 35, 35, 7, 22, 35, 38, 35, 30, 21, 37]
idx = sortperm(k; lt=!isless)
@test issorted(k[idx], rev=true)
end

# This testset is at the end of the file because it is slow

0 comments on commit 9942028

Please sign in to comment.