From 1c874bdbb4b2bd294cae619261e0f09c6f6c4e72 Mon Sep 17 00:00:00 2001 From: Julius Krumbiegel Date: Wed, 1 Nov 2023 07:10:01 +0100 Subject: [PATCH] add test --- test/scenes.jl | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/scenes.jl b/test/scenes.jl index d7bb82c6547..331809c560e 100644 --- a/test/scenes.jl +++ b/test/scenes.jl @@ -6,6 +6,17 @@ end @test theme(nothing, :nonexistant, default=1) == 1 @test theme(scene, :nonexistant, default=1) == 1 + + # test that deprecated `resolution keyword still works but throws warning` + errstring = mktemp() do path, io + redirect_stderr(io) do + scene = Scene(; resolution = (999, 999), size = (123, 123)) + @test scene.px_area[] == Rect2i((0, 0), (999, 999)) + end + flush(io) + s = read(path, String) + end + @test occursin("The `resolution` keyword for `Scene`s and `Figure`s has been deprecated", errstring) end @testset "Lighting" begin