From e20716758dbba0d3aeb2028c18d592ad65d6d26d Mon Sep 17 00:00:00 2001 From: Jonas Isensee Date: Sun, 8 Sep 2024 20:21:58 +0200 Subject: [PATCH] @test_warn behaves differently on julia <1.7 --- test/test_files.jl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/test_files.jl b/test/test_files.jl index 27ebc152..6c40eefb 100644 --- a/test/test_files.jl +++ b/test/test_files.jl @@ -273,7 +273,11 @@ end @testset "Reconstruct struct with singleton fields" begin fn = joinpath(testfiles,"singleton_struct_fields.jld2") - @test_warn "type Main.MissingStruct does not exist in workspace; reconstructing" ms = load(fn, "ms") + if VERSION ≥ v"1.7" + @test_warn "type Main.MissingStruct does not exist in workspace; reconstructing" ms = load(fn, "ms") + else # @test_warn works differently on 1.6 + ms = load(fn, "ms") + end @test ms.a == 1 @test ms.b === nothing @test ms.c === missing