Skip to content

Commit

Permalink
Enhance testing
Browse files Browse the repository at this point in the history
  • Loading branch information
t-bltg committed Sep 14, 2021
1 parent 08d2157 commit 911309a
Showing 1 changed file with 22 additions and 11 deletions.
33 changes: 22 additions & 11 deletions test/test_axes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,26 @@ end
end

@testset "aliases" begin
plot(1:2, xl = "x label")
plot(1:2, xrange = (1, 2))
plot(1:2, xtick = :auto)
plot(1:2, xlabelfontsize = 10)
plot(1:2, xgα = .1)
plot(1:2, xgridls = :solid)
plot(1:2, xgridcolor = :red)
plot(1:2, xminorgridcolor = :red)
plot(1:2, xgrid_lw = .1)
plot(1:2, xminorgrid_lw = .1)
plot(1:2, xtickor = :out)
p = plot(1:2, xl = "x label")
@test p[1][:xaxis][:guide] === "x label"
p = plot(1:2, xrange = (0, 3))
@test xlims(p) === (0, 3)
p = plot(1:2, xtick = [1.25, 1.5, 1.75])
@test p[1][:xaxis][:ticks] == [1.25, 1.5, 1.75]
p = plot(1:2, xlabelfontsize = 4)
@test p[1][:xaxis][:guidefontsize] == 4
p = plot(1:2, gridalpha = .07)
@test p[1][:xaxis][:gridalpha] .07
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

0 comments on commit 911309a

Please sign in to comment.