~ninjin/julia-nix

8f0b17b3635876a1fbf64f2ef564e5b2cee169a3 — Jameson Nash 2 years ago 2f47dae
test: make errorshow test more robust
1 files changed, 8 insertions(+), 5 deletions(-)

M test/errorshow.jl
M test/errorshow.jl => test/errorshow.jl +8 -5
@@ 728,7 728,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


@@ 740,7 740,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


@@ 749,7 749,8 @@ module B
end

@testset "backtrace" begin
    bt = try B.D.g()
    bt = try
        B.D.g()
    catch
        catch_backtrace()
    end


@@ 777,7 778,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


@@ 785,7 787,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