Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ julia = "1"
[extras]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Aqua", "Random", "StatsBase", "Test"]
test = ["Aqua", "Random", "Test"]
3 changes: 0 additions & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using SortingAlgorithms
using Test
using StatsBase
using Random

stable_algorithms = [TimSort, RadixSort, PagedMergeSort]
Expand Down Expand Up @@ -81,14 +80,12 @@ Random.seed!(0xdeadbeef)
for n in [0:10..., 100, 101, 1000, 1001]
r = 1:10
v = rand(1:10,n)
h = fit(Histogram, v, r)

for ord in [Base.Order.Forward, Base.Order.Reverse]
# insertion sort (stable) as reference
pi = sortperm(v, alg=InsertionSort, order=ord)
@test isperm(pi)
si = v[pi]
@test fit(Histogram, si, r) == h
@test issorted(si, order=ord)
@test all(issorted,[pi[si.==x] for x in r])
c = copy(v)
Expand Down
Loading