From d633bd8bfa87c772a19e702c6cbb66cada17768f Mon Sep 17 00:00:00 2001 From: Simon Christ Date: Thu, 30 Jul 2020 12:14:17 +0200 Subject: [PATCH 1/2] add more tests --- test/test_plot.jl | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 test/test_plot.jl diff --git a/test/test_plot.jl b/test/test_plot.jl new file mode 100644 index 00000000..8a0918a9 --- /dev/null +++ b/test/test_plot.jl @@ -0,0 +1,17 @@ +using Plots, Test + +@testset "Adding attributes" begin + pl = plot(rand(8,8), layout = 4) + pl_all = plot!(deepcopy(pl); label = ["test" for _ in 1:8]) + pl_subplot = plot!(deepcopy(pl); label = ["test" for _ in 1:2], subplot = 2) + pl_series = plot!(deepcopy(pl); label = "test", series = 5) + for series in pl_all.series_list + @test series[:label] == "test" + end + @test pl_subplot[1][1][:label] == "y1" + for series in pl_subplot[2].series_list + @test series[:label] == "test" + end + @test pl_series[1][1][:label] == "y1" + @test pl_series.series_list[5][:label] == "test" +end From 313d11274269ff29ec5d37a46b56a2961b085a10 Mon Sep 17 00:00:00 2001 From: Simon Christ Date: Thu, 30 Jul 2020 12:15:58 +0200 Subject: [PATCH 2/2] Update runtests.jl --- test/runtests.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/test/runtests.jl b/test/runtests.jl index 67b6e6b1..579f1b3d 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -10,6 +10,7 @@ using LibGit2 import GeometryTypes, GeometryBasics using Dates +include("test_plot.jl") include("test_axes.jl") include("test_hdf5plots.jl") include("test_pgfplotsx.jl")