add tests
This commit is contained in:
parent
c81fe1ea76
commit
099817e083
15
test/integration_dates.jl
Normal file
15
test/integration_dates.jl
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
using Plots, Test, Dates
|
||||||
|
|
||||||
|
@testset "Limits" begin
|
||||||
|
y=[1.0*i*i for i in 1:10]
|
||||||
|
x=[Date(2019,11,i) for i in 1:10]
|
||||||
|
|
||||||
|
rx=[x[3],x[5]]
|
||||||
|
|
||||||
|
ref_ylims = (y[begin], y[end])
|
||||||
|
ref_xlims = (x[1].instant.periods.value, x[end].instant.periods.value)
|
||||||
|
p = plot(x,y, widen = false)
|
||||||
|
vspan!(p, rx, label="", alpha=0.2)
|
||||||
|
@test Plots.ylims(p) == ref_ylims
|
||||||
|
@test Plots.xlims(p) == ref_xlims
|
||||||
|
end # testset
|
||||||
@ -16,6 +16,7 @@ include("test_axis_letter.jl")
|
|||||||
include("test_recipes.jl")
|
include("test_recipes.jl")
|
||||||
include("test_hdf5plots.jl")
|
include("test_hdf5plots.jl")
|
||||||
include("test_pgfplotsx.jl")
|
include("test_pgfplotsx.jl")
|
||||||
|
include("integration_dates.jl")
|
||||||
|
|
||||||
reference_dir(args...) = joinpath(homedir(), ".julia", "dev", "PlotReferenceImages", args...)
|
reference_dir(args...) = joinpath(homedir(), ".julia", "dev", "PlotReferenceImages", args...)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user