summaryrefslogtreecommitdiffstats
path: root/test/tvltypes.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>1999-10-06 18:12:19 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>1999-10-06 18:12:19 (GMT)
commit6f649e66b2837fc06e1c400f3f5d9d61040bedc5 (patch)
tree6b3d0a5e53c08447120502ca8874ad08c4e3a62d /test/tvltypes.c
parent02d8d63ad54ed54f98b3dd7318492a31c696f8e2 (diff)
downloadhdf5-6f649e66b2837fc06e1c400f3f5d9d61040bedc5.zip
hdf5-6f649e66b2837fc06e1c400f3f5d9d61040bedc5.tar.gz
hdf5-6f649e66b2837fc06e1c400f3f5d9d61040bedc5.tar.bz2
[svn-r1730] Close & re-open the file to make certain that the VL datatype information is
being written correctly.
Diffstat (limited to 'test/tvltypes.c')
-rw-r--r--test/tvltypes.c42
1 files changed, 41 insertions, 1 deletions
diff --git a/test/tvltypes.c b/test/tvltypes.c
index 30d9608..e20aefc 100644
--- a/test/tvltypes.c
+++ b/test/tvltypes.c
@@ -591,6 +591,46 @@ test_vltypes_vlen_vlen_atomic(void)
ret=H5Dwrite(dataset,tid2,H5S_ALL,H5S_ALL,H5P_DEFAULT,wdata);
CHECK(ret, FAIL, "H5Dwrite");
+ /* Close Dataset */
+ ret = H5Dclose(dataset);
+ CHECK(ret, FAIL, "H5Dclose");
+
+ /* Close datatype */
+ ret = H5Tclose(tid2);
+ CHECK(ret, FAIL, "H5Tclose");
+
+ /* Close datatype */
+ ret = H5Tclose(tid1);
+ CHECK(ret, FAIL, "H5Tclose");
+
+ /* Close disk dataspace */
+ ret = H5Sclose(sid1);
+ CHECK(ret, FAIL, "H5Sclose");
+
+ /* Close file */
+ ret = H5Fclose(fid1);
+ CHECK(ret, FAIL, "H5Fclose");
+
+ /* Create file */
+ fid1 = H5Fopen(FILE, H5F_ACC_RDONLY, H5P_DEFAULT);
+ CHECK(fid1, FAIL, "H5Fopen");
+
+ /* Create dataspace for datasets */
+ sid1 = H5Screate_simple(SPACE1_RANK, dims1, NULL);
+ CHECK(sid1, FAIL, "H5Screate_simple");
+
+ /* Create a VL datatype to refer to */
+ tid1 = H5Tvlen_create (H5T_NATIVE_UINT);
+ CHECK(tid1, FAIL, "H5Tvlen_create");
+
+ /* Create the base VL type */
+ tid2 = H5Tvlen_create (tid1);
+ CHECK(tid2, FAIL, "H5Tvlen_create");
+
+ /* Open a dataset */
+ dataset=H5Dopen(fid1,"Dataset1");
+ CHECK(dataset, FAIL, "H5Dopen");
+
/* Change to the custom memory allocation routines for reading VL data */
xfer_pid=H5Pcreate(H5P_DATA_XFER);
CHECK(xfer_pid, FAIL, "H5Pcreate");
@@ -598,7 +638,7 @@ test_vltypes_vlen_vlen_atomic(void)
ret=H5Pset_vlen_mem_manager(xfer_pid,test_vltypes_alloc_custom,&mem_used,test_vltypes_free_custom,&mem_used);
CHECK(ret, FAIL, "H5Pset_vlen_mem_manager");
- /* Make certain the correct amount of memory will be used */
+ /* Make certain the correct amount of memory was used */
ret=H5Dvlen_get_buf_size(dataset,tid2,sid1,&size);
CHECK(ret, FAIL, "H5Dvlen_get_buf_size");