Skip to content

Commit

Permalink
change test to TestLogger
Browse files Browse the repository at this point in the history
  • Loading branch information
jkrumbiegel committed Nov 1, 2023
1 parent 962fcfd commit b63eefc
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions test/scenes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,12 @@
@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)
logger = Test.TestLogger()
Base.with_logger(logger) do
scene = Scene(; resolution = (999, 999), size = (123, 123))
@test scene.px_area[] == Rect2i((0, 0), (999, 999))
end
@test occursin("The `resolution` keyword for `Scene`s and `Figure`s has been deprecated", errstring)
@test occursin("The `resolution` keyword for `Scene`s and `Figure`s has been deprecated", logger.logs[1].message)
end

@testset "Lighting" begin
Expand Down

0 comments on commit b63eefc

Please sign in to comment.