Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Union{} test for v1.10 #473

Merged
merged 2 commits into from
Jul 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions test/rw.jl
Original file line number Diff line number Diff line change
Expand Up @@ -243,15 +243,6 @@ zerod[] = 1
zerod_any = Array{Any}(undef)
zerod_any[] = 1.0+1.0im

# Type with None typed field
struct NoneTypedField{T}
a::Int
b::T

NoneTypedField{T}(a) where T = new(a)
end
nonetypedfield = NoneTypedField{Union{}}(47)

# Cyclic object
mutable struct CyclicObject
x::CyclicObject
Expand Down Expand Up @@ -292,7 +283,6 @@ end
iseq(x::MyStruct, y::MyStruct) = (x.len == y.len && x.data == y.data)
iseq(x::MyImmutable, y::MyImmutable) = (isequal(x.x, y.x) && isequal(x.y, y.y) && isequal(x.z, y.z))
iseq(x::Union{EmptyTI,EmptyTT,EmptyIT}, y::Union{EmptyTI,EmptyTT,EmptyIT}) = iseq(x.x, y.x)
iseq(x::NoneTypedField{Union{}}, y::NoneTypedField{Union{}}) = x.a === y.a
iseq(c1::Array, c2::Array) = length(c1) == length(c2) && all(p->iseq(p...), zip(c1, c2))
function iseq(c1::Base.Sys.CPUinfo, c2::Base.Sys.CPUinfo)
for n in fieldnames(Base.Sys.CPUinfo)
Expand Down Expand Up @@ -463,7 +453,6 @@ for ioty in [JLD2.MmapIO, IOStream], compress in [false, true]
@write fid tuple_of_tuples
@write fid zerod
@write fid zerod_any
@write fid nonetypedfield
@write fid cyclicobject
@write fid simplevec
@write fid natyperef
Expand Down Expand Up @@ -599,7 +588,6 @@ for ioty in [JLD2.MmapIO, IOStream], compress in [false, true]
@check fidr tuple_of_tuples
@check fidr zerod
@check fidr zerod_any
@check fidr nonetypedfield

obj = read(fidr, "cyclicobject")
@test obj.x === obj
Expand Down
8 changes: 4 additions & 4 deletions test/test_files.jl
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ testfiles = artifact"testfiles/JLD2TestFiles-0.1.0/artifacts"
fn = "netcdf.nc"
jldopen(fn) do f
@test f["hello"] == ones(5)
@test_broken f["x"]
@test_broken f["z"]
#@test_broken f["x"]
#@test_broken f["z"]
@test f["grouped/data"] == 0:9
@test_broken f["grouped/y"]
#@test_broken f["grouped/y"]
end

fn = "simple.nc"
Expand Down Expand Up @@ -121,4 +121,4 @@ testfiles = artifact"testfiles/JLD2TestFiles-0.1.0/artifacts"
end

end
end
end
Loading