Skip to content

Commit 10a3c6f

Browse files
authored
Test with Aqua.jl and fix ambiguity (#80)
1 parent fc46946 commit 10a3c6f

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

Project.toml

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@ version = "1.2.0"
66
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
77

88
[compat]
9-
julia = "1"
109
DataStructures = "0.9, 0.10, 0.11, 0.12, 0.13, 0.14, 0.15, 0.16, 0.17, 0.18"
10+
julia = "1"
1111

1212
[extras]
13+
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
1314
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
1415
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
1516
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
1617

1718
[targets]
18-
test = ["Random", "StatsBase", "Test"]
19+
test = ["Aqua", "Random", "StatsBase", "Test"]

src/SortingAlgorithms.jl

+3
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,9 @@ end
582582
function sort!(vs::AbstractVector{T}, lo::Int, hi::Int, ::RadixSortAlg, o::Ordering, ts::Union{Nothing, AbstractVector{T}}=nothing) where T
583583
sort!(vs, lo, hi, Base.DEFAULT_STABLE, o)
584584
end
585+
function sort!(vs::AbstractVector{T}, lo::Int, hi::Int, ::RadixSortAlg, o::Ordering, ts::Vector{T}) where T # disambiguate
586+
sort!(vs, lo, hi, Base.DEFAULT_STABLE, o)
587+
end
585588
else
586589

587590
# Map a bits-type to an unsigned int, maintaining sort order

test/aqua.jl

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
using Aqua
2+
Aqua.test_all(SortingAlgorithms)

test/runtests.jl

+2
Original file line numberDiff line numberDiff line change
@@ -158,3 +158,5 @@ if isdefined(Base.Sort, :InitialOptimizations)
158158
v = [0,1]
159159
@test sort(v, alg=SortingAlgorithms.PagedMergeSortAlg()) == sort(v, alg=MergeSort)
160160
end
161+
162+
include("aqua.jl")

0 commit comments

Comments
 (0)