Skip to content

Commit 54590dc

Browse files
vtjnashKristofferC
authored andcommitted
test: make errorshow test more robust
(cherry picked from commit 8f0b17b)
1 parent 28ce0a4 commit 54590dc

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

test/errorshow.jl

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,7 @@ end
723723

724724
# Test that implementation detail of include() is hidden from the user by default
725725
let bt = try
726-
include("testhelpers/include_error.jl")
726+
@noinline include("testhelpers/include_error.jl")
727727
catch
728728
catch_backtrace()
729729
end
@@ -735,7 +735,7 @@ end
735735
# Test backtrace printing
736736
module B
737737
module C
738-
f(x; y=2.0) = error()
738+
@noinline f(x; y=2.0) = error()
739739
end
740740
module D
741741
import ..C: f
@@ -744,7 +744,8 @@ module B
744744
end
745745

746746
@testset "backtrace" begin
747-
bt = try B.D.g()
747+
bt = try
748+
B.D.g()
748749
catch
749750
catch_backtrace()
750751
end
@@ -772,15 +773,17 @@ if Sys.isapple() || (Sys.islinux() && Sys.ARCH === :x86_64)
772773
pair_repeater_b() = pair_repeater_a()
773774

774775
@testset "repeated stack frames" begin
775-
let bt = try single_repeater()
776+
let bt = try
777+
single_repeater()
776778
catch
777779
catch_backtrace()
778780
end
779781
bt_str = sprint(Base.show_backtrace, bt)
780782
@test occursin(r"repeats \d+ times", bt_str)
781783
end
782784

783-
let bt = try pair_repeater_a()
785+
let bt = try
786+
pair_repeater_a()
784787
catch
785788
catch_backtrace()
786789
end

0 commit comments

Comments
 (0)