From b412b6625c2c87407953614b0a1fd3faea4788e0 Mon Sep 17 00:00:00 2001 From: Nathan Daly Date: Sat, 22 Sep 2018 10:24:57 -0400 Subject: [PATCH] added test that Window(async=true) is faster than async=false. --- test/AtomShell/window.jl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/AtomShell/window.jl b/test/AtomShell/window.jl index 6286d39..644bba5 100644 --- a/test/AtomShell/window.jl +++ b/test/AtomShell/window.jl @@ -8,3 +8,12 @@ using Test size(w, 200,200) @test size(w) == [200,200] end + +@testset "async" begin + # Test that async Window() creation is faster than synchronous creation. + # (Repeat the test a few times, just to be sure it's consistent.) + for _ in 1:5 + (@timed Window(Blink.@d(:show => false), async=true))[2] < + (@timed Window(Blink.@d(:show => false), async=false))[2] + end +end