summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2019-01-02 18:47:37 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2019-01-02 18:47:37 (GMT)
commited0c468902409ae7fa8fb91c5f5a3a3093846736 (patch)
tree77aa865b65d90ccc16db21ec6f0dff19aa948069
parentf3636c573f6651a2d7666f6e80524c4a97231c57 (diff)
downloadhdf5-ed0c468902409ae7fa8fb91c5f5a3a3093846736.zip
hdf5-ed0c468902409ae7fa8fb91c5f5a3a3093846736.tar.gz
hdf5-ed0c468902409ae7fa8fb91c5f5a3a3093846736.tar.bz2
HDFFV-10664 add check for state before set call
-rw-r--r--java/test/TestH5Dplist.java5
-rw-r--r--java/test/TestH5Fbasic.java5
2 files changed, 8 insertions, 2 deletions
diff --git a/java/test/TestH5Dplist.java b/java/test/TestH5Dplist.java
index 1d45a03..1b5acfa 100644
--- a/java/test/TestH5Dplist.java
+++ b/java/test/TestH5Dplist.java
@@ -13,6 +13,7 @@
package test;
+import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
@@ -213,11 +214,13 @@ public class TestH5Dplist {
@Test
public void testH5P_dset_no_attrs_hint() {
- boolean ret_val_id = false;
+ boolean ret_val_id = true;
_createPDataset(H5fid, H5dsid, "dset", HDF5Constants.H5P_DATASET_CREATE);
try {
+ ret_val_id = H5.H5Pget_dset_no_attrs_hint(H5dcpl_id);
+ assertFalse("H5P_dset_no_attrs_hint", ret_val_id);
H5.H5Pset_dset_no_attrs_hint(H5dcpl_id, true);
ret_val_id = H5.H5Pget_dset_no_attrs_hint(H5dcpl_id);
assertTrue("H5P_dset_no_attrs_hint", ret_val_id);
diff --git a/java/test/TestH5Fbasic.java b/java/test/TestH5Fbasic.java
index 9196ea6..fff9523 100644
--- a/java/test/TestH5Fbasic.java
+++ b/java/test/TestH5Fbasic.java
@@ -14,6 +14,7 @@
package test;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
@@ -331,8 +332,10 @@ public class TestH5Fbasic {
@Test
public void testH5F_dset_no_attrs_hint() {
- boolean ret_val_id = false;
+ boolean ret_val_id = true;
try {
+ ret_val_id = H5.H5Fget_dset_no_attrs_hint(H5fid);
+ assertFalse("H5F_dset_no_attrs_hint", ret_val_id);
H5.H5Fset_dset_no_attrs_hint(H5fid, true);
ret_val_id = H5.H5Fget_dset_no_attrs_hint(H5fid);
assertTrue("H5F_dset_no_attrs_hint", ret_val_id);