Skip to content

Commit

Permalink
Restrict aqua tests to Julia v1.10+
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierHnt committed Dec 9, 2024
1 parent 7ed02c7 commit 5a8ac50
Showing 1 changed file with 20 additions and 18 deletions.
38 changes: 20 additions & 18 deletions test/aqua.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,27 @@ using Test
using IntervalArithmetic
using Aqua

@testset "Aqua tests (performance)" begin
# This tests that we don't accidentally run into
# https://github.com/JuliaLang/julia/issues/29393
# Aqua.test_unbound_args(IntervalArithmetic)
ua = Aqua.detect_unbound_args_recursively(IntervalArithmetic)
@test length(ua) == 0
if VERSION v"1.10"
@testset "Aqua tests (performance)" begin
# This tests that we don't accidentally run into
# https://github.com/JuliaLang/julia/issues/29393
# Aqua.test_unbound_args(IntervalArithmetic)
ua = Aqua.detect_unbound_args_recursively(IntervalArithmetic)
@test length(ua) == 0

# See: https://github.com/SciML/OrdinaryDiffEq.jl/issues/1750
# Test that we're not introducing method ambiguities across deps
ambs = Aqua.detect_ambiguities(IntervalArithmetic; recursive = true)
pkg_match(pkgname, pkdir::Nothing) = false
pkg_match(pkgname, pkdir::AbstractString) = occursin(pkgname, pkdir)
filter!(x -> pkg_match("IntervalArithmetic", pkgdir(last(x).module)), ambs)
for method_ambiguity ambs
@show method_ambiguity
# See: https://github.com/SciML/OrdinaryDiffEq.jl/issues/1750
# Test that we're not introducing method ambiguities across deps
ambs = Aqua.detect_ambiguities(IntervalArithmetic; recursive = true)
pkg_match(pkgname, pkdir::Nothing) = false
pkg_match(pkgname, pkdir::AbstractString) = occursin(pkgname, pkdir)
filter!(x -> pkg_match("IntervalArithmetic", pkgdir(last(x).module)), ambs)
for method_ambiguity ambs
@show method_ambiguity
end
@test length(ambs) == 0
end
@test length(ambs) == 0
end

@testset "Aqua tests (additional)" begin
Aqua.test_all(IntervalArithmetic)
@testset "Aqua tests (additional)" begin
Aqua.test_all(IntervalArithmetic)
end
end

0 comments on commit 5a8ac50

Please sign in to comment.