Skip to content

Commit

Permalink
@test_warn behaves differently on julia <1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasIsensee committed Sep 8, 2024
1 parent 0ec2783 commit e207167
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/test_files.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e207167

Please sign in to comment.