Skip to content

Commit

Permalink
Silence test errors (#843)
Browse files Browse the repository at this point in the history
(cherry picked from commit f5059d7)
  • Loading branch information
musm committed Oct 27, 2021
1 parent 2cde0d0 commit 6cfa8fd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/plain.jl
Original file line number Diff line number Diff line change
Expand Up @@ -428,10 +428,10 @@ end # testset "Test h5d_fill
gatherf_ptr = @cfunction(gatherf, HDF5.herr_t, (Ptr{Nothing}, Csize_t, Ptr{Nothing}))
@test HDF5.h5d_gather(dataspace(d), src_buf, datatype(Int), sizeof(dst_buf)÷2, dst_buf, gatherf_ptr, C_NULL) |> isnothing
gatherf_bad_ptr = @cfunction(gatherf_bad, HDF5.herr_t, (Ptr{Nothing}, Csize_t, Ptr{Nothing}))
@test_throws ErrorException HDF5.h5d_gather(dataspace(d), src_buf, datatype(Int), sizeof(dst_buf)÷2, dst_buf, gatherf_bad_ptr, C_NULL) == 0
@test_throws ErrorException HDF5.silence_errors(() -> HDF5.h5d_gather(dataspace(d), src_buf, datatype(Int), sizeof(dst_buf)÷2, dst_buf, gatherf_bad_ptr, C_NULL))
gatherf_data_ptr = @cfunction(gatherf_data, HDF5.herr_t, (Ptr{Nothing}, Csize_t, Ref{Int}))
@test HDF5.h5d_gather(dataspace(d), src_buf, datatype(Int), sizeof(dst_buf)÷2, dst_buf, gatherf_data_ptr, Ref(9)) |> isnothing
@test_throws ErrorException HDF5.h5d_gather(dataspace(d), src_buf, datatype(Int), sizeof(dst_buf)÷2, dst_buf, gatherf_data_ptr, 10)
@test_throws ErrorException HDF5.silence_errors(() -> HDF5.h5d_gather(dataspace(d), src_buf, datatype(Int), sizeof(dst_buf)÷2, dst_buf, gatherf_data_ptr, 10))
end
rm(fn)
end
Expand All @@ -446,7 +446,7 @@ end
scatterf_ptr = @cfunction(scatterf, HDF5.herr_t, (Ptr{Ptr{Nothing}}, Ptr{Csize_t}, Ptr{Nothing}))
@test HDF5.h5d_scatter(scatterf_ptr, C_NULL, datatype(Int), dataspace(d), dst_buf) |> isnothing
scatterf_bad_ptr = @cfunction(scatterf_bad, HDF5.herr_t, (Ptr{Ptr{Nothing}}, Ptr{Csize_t}, Ptr{Nothing}))
@test_throws ErrorException HDF5.h5d_scatter(scatterf_bad_ptr, C_NULL, datatype(Int), dataspace(d), dst_buf)
@test_throws ErrorException HDF5.silence_errors(() -> HDF5.h5d_scatter(scatterf_bad_ptr, C_NULL, datatype(Int), dataspace(d), dst_buf))
scatterf_data_ptr = @cfunction(scatterf_data, HDF5.herr_t, (Ptr{Ptr{Int}}, Ptr{Csize_t}, Ref{Int}))
@test HDF5.h5d_scatter(scatterf_data_ptr, Ref(9), datatype(Int), dataspace(d), dst_buf) |> isnothing
end
Expand Down

0 comments on commit 6cfa8fd

Please sign in to comment.