Skip to content

Commit

Permalink
Test with Aqua.jl and fix ambiguity (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
LilithHafner authored Oct 18, 2023
1 parent fc46946 commit 10a3c6f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ version = "1.2.0"
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"

[compat]
julia = "1"
DataStructures = "0.9, 0.10, 0.11, 0.12, 0.13, 0.14, 0.15, 0.16, 0.17, 0.18"
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 = ["Random", "StatsBase", "Test"]
test = ["Aqua", "Random", "StatsBase", "Test"]
3 changes: 3 additions & 0 deletions src/SortingAlgorithms.jl
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,9 @@ end
function sort!(vs::AbstractVector{T}, lo::Int, hi::Int, ::RadixSortAlg, o::Ordering, ts::Union{Nothing, AbstractVector{T}}=nothing) where T
sort!(vs, lo, hi, Base.DEFAULT_STABLE, o)
end
function sort!(vs::AbstractVector{T}, lo::Int, hi::Int, ::RadixSortAlg, o::Ordering, ts::Vector{T}) where T # disambiguate
sort!(vs, lo, hi, Base.DEFAULT_STABLE, o)
end
else

# Map a bits-type to an unsigned int, maintaining sort order
Expand Down
2 changes: 2 additions & 0 deletions test/aqua.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
using Aqua
Aqua.test_all(SortingAlgorithms)
2 changes: 2 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,5 @@ if isdefined(Base.Sort, :InitialOptimizations)
v = [0,1]
@test sort(v, alg=SortingAlgorithms.PagedMergeSortAlg()) == sort(v, alg=MergeSort)
end

include("aqua.jl")

0 comments on commit 10a3c6f

Please sign in to comment.