diff --git a/test/runtests.jl b/test/runtests.jl index 1e779c7..7029fbe 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -271,9 +271,15 @@ end @test fs |> extrema |> collect |> diff |> first > 1.9 end - let f = sinc, int = (0, 40) # JuliaPlots/Plots.jl/issues/3894 - xs, fs = adapted_grid(f, int) - @test length(xs) > 400 + let f = sinc, int = (-40, 40) # JuliaPlots/Plots.jl/issues/3894 + xs, fs = adapted_grid(sinc, int) + roots = vcat(int[1]:-1, 1:int[2]) + count_per_extrema = map(1:length(roots)-1) do idx + left = roots[idx]; right = roots[idx+1] + return count(x -> left < x < right, xs) + end + # check that we have at least 5 points for each extrema + @test all(count_per_extrema .>= 5) end end