Skip to content

Commit

Permalink
Fix leaking reference to dataspace
Browse files Browse the repository at this point in the history
  • Loading branch information
grimbough committed Nov 29, 2023
1 parent 00744fc commit 1fd6af3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
on:
push:
branches:
- master
- devel
pull_request:
branches:
- master
- devel

name: R-CMD-check
Expand Down
8 changes: 5 additions & 3 deletions tests/testthat/test_H5A.R
Original file line number Diff line number Diff line change
Expand Up @@ -152,16 +152,18 @@ test_that("fixed length string attributes are correct", {
H5Tset_size(tid, nchar(attr_value))

fid <- H5Fopen(h5File)
sid <- H5Screate("H5S_SCALAR")
aid <- H5Acreate(fid, name = attr_name,
dtype_id=tid, h5space=H5Screate("H5S_SCALAR"))
dtype_id=tid, h5space = sid)

H5Awrite(aid, attr_value) # string of length 7

H5Aclose(aid)
H5Fclose(fid)
h5closeAll(aid, sid, fid)

attr <- h5readAttributes(h5File, "/")
expect_is(attr, class = "list")
expect_equal(names(attr), attr_name)
expect_equal(attr$name, attr_value)
})

expect_length(h5validObjects(), 0)

0 comments on commit 1fd6af3

Please sign in to comment.