From 54590dc59e9700b7e27f1bf750dc1c6bc8d93bd3 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Tue, 14 Sep 2021 12:00:38 -0400 Subject: [PATCH] test: make errorshow test more robust (cherry picked from commit 8f0b17b3635876a1fbf64f2ef564e5b2cee169a3) --- test/errorshow.jl | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/test/errorshow.jl b/test/errorshow.jl index 24d0241049da04..7982ef586a871a 100644 --- a/test/errorshow.jl +++ b/test/errorshow.jl @@ -723,7 +723,7 @@ end # Test that implementation detail of include() is hidden from the user by default let bt = try - include("testhelpers/include_error.jl") + @noinline include("testhelpers/include_error.jl") catch catch_backtrace() end @@ -735,7 +735,7 @@ end # Test backtrace printing module B module C - f(x; y=2.0) = error() + @noinline f(x; y=2.0) = error() end module D import ..C: f @@ -744,7 +744,8 @@ module B end @testset "backtrace" begin - bt = try B.D.g() + bt = try + B.D.g() catch catch_backtrace() end @@ -772,7 +773,8 @@ if Sys.isapple() || (Sys.islinux() && Sys.ARCH === :x86_64) pair_repeater_b() = pair_repeater_a() @testset "repeated stack frames" begin - let bt = try single_repeater() + let bt = try + single_repeater() catch catch_backtrace() end @@ -780,7 +782,8 @@ if Sys.isapple() || (Sys.islinux() && Sys.ARCH === :x86_64) @test occursin(r"repeats \d+ times", bt_str) end - let bt = try pair_repeater_a() + let bt = try + pair_repeater_a() catch catch_backtrace() end