diff --git a/test/test_components.jl b/test/test_components.jl index b6f14f7b..1ade43d5 100644 --- a/test/test_components.jl +++ b/test/test_components.jl @@ -33,7 +33,7 @@ using Plots, Test square = Shape([(0,0),(1,0),(1,1),(0,1)]) # make a new, rotated square - square2 = rotate(square, -2) + square2 = Plots.rotate(square, -2) @test square2.x ≈ coordsRotated2[1,:] @test square2.y ≈ coordsRotated2[2,:] @@ -90,3 +90,22 @@ end @test finalSizes == initialSizes end end + +@testset "Series Annotations" begin + square = Shape([(0,0),(1,0),(1,1),(0,1)]) + @test_logs (:warn,"Unused SeriesAnnotations arg: triangle (Symbol)") begin + p = plot([1,2,3], + series_annotations=(["a"], + 2, # pass a scale factor + (1,4), # pass two scale factors (overwrites first one) + square, # pass a shape + font(:courier), # pass an annotation font + :triangle # pass an incorrect argument + )) + sa = p.series_list[1].plotattributes[:series_annotations] + @test sa.strs == ["a"] + @test sa.font.family == "courier" + @test sa.baseshape == square + @test sa.scalefactor == (1,4) + end +end