Enhance testing

This commit is contained in:
t-bltg 2021-09-14 17:11:23 +02:00
parent 08d2157790
commit ebc2a51e18

View File

@ -65,15 +65,26 @@ end
end end
@testset "aliases" begin @testset "aliases" begin
plot(1:2, xl = "x label") p = plot(1:2, xl = "x label")
plot(1:2, xrange = (1, 2)) @test p[1][:xaxis][:guide] === "x label"
plot(1:2, xtick = :auto) p = plot(1:2, xrange = (0, 3))
plot(1:2, xlabelfontsize = 10) @test xlims(p) === (0, 3)
plot(1:2, xgα = .1) p = plot(1:2, xtick = [1.25, 1.5, 1.75])
plot(1:2, xgridls = :solid) @test p[1][:xaxis][:ticks] == [1.25, 1.5, 1.75]
plot(1:2, xgridcolor = :red) p = plot(1:2, xlabelfontsize = 4)
plot(1:2, xminorgridcolor = :red) @test p[1][:xaxis][:guidefontsize] == 4
plot(1:2, xgrid_lw = .1) p = plot(1:2, xgα = .07)
plot(1:2, xminorgrid_lw = .1) @test p[1][:xaxis][:gridalpha] .07
plot(1:2, xtickor = :out) p = plot(1:2, xgridls = :dashdot)
@test p[1][:xaxis][:gridstyle] === :dashdot
p = plot(1:2, xgridcolor = :red)
@test p[1][:xaxis][:foreground_color_grid] === RGBA{Float64}(1.,0.,0.,1.)
p = plot(1:2, xminorgridcolor = :red)
@test p[1][:xaxis][:foreground_color_minor_grid] === RGBA{Float64}(1.,0.,0.,1.)
p = plot(1:2, xgrid_lw = .01)
@test p[1][:xaxis][:gridlinewidth] .01
p = plot(1:2, xminorgrid_lw = .01)
@test p[1][:xaxis][:minorgridlinewidth] .01
p = plot(1:2, xtickor = :out)
@test p[1][:xaxis][:tick_direction] === :out
end end