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

Revert "Disable h5a_iterate and h5l_iterate assertion tests (#1155)" #1157

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
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
10 changes: 8 additions & 2 deletions src/api/helpers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,11 @@ function h5a_iterate_helper(
)::herr_t
f, err_ref = data
try
return herr_t(f(loc_id, attr_name, ainfo))
ret = herr_t(f(loc_id, attr_name, ainfo))
@async @info "h5a_iterate_helper" ret
return ret
catch err
@async @info "h5a_iterate_helper got an error" err
err_ref[] = err
return herr_t(-1)
end
Expand Down Expand Up @@ -465,8 +468,11 @@ function h5l_iterate_helper(
)::herr_t
f, err_ref = data
try
return herr_t(f(group, name, info))
ret = herr_t(f(group, name, info))
@async @info "h5l_iterate_helper" ret
return ret
catch err
@async @info "h5l_iterate_helper got an error" err
err_ref[] = err
return herr_t(-1)
end
Expand Down
8 changes: 2 additions & 6 deletions test/api.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,10 @@ using HDF5, Test
@test names == ["a"]

# Julia error
#=
@test_throws AssertionError HDF5.API.h5a_iterate(
f, HDF5.API.H5_INDEX_NAME, HDF5.API.H5_ITER_INC
) do loc, name, info
@assert false
throw(AssertionError("False is not true"))
end

# HDF5 error
Expand All @@ -51,7 +50,6 @@ using HDF5, Test
) do loc, name, info
return -1
end
=#
end

@testset "h5l_iterate" begin
Expand Down Expand Up @@ -91,7 +89,6 @@ end
end == 1
@test names == ["a"]

#=
# HDF5 error
@test_throws HDF5.API.H5Error HDF5.API.h5l_iterate(
f, HDF5.API.H5_INDEX_NAME, HDF5.API.H5_ITER_INC
Expand All @@ -103,9 +100,8 @@ end
@test_throws AssertionError HDF5.API.h5l_iterate(
f, HDF5.API.H5_INDEX_NAME, HDF5.API.H5_ITER_INC
) do loc, name, info
@assert false
throw(AssertionError("False is not true"))
end
=#
end

@testset "h5dchunk_iter" begin
Expand Down
Loading