mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-03-25 17:00:45 +08:00
HDFFV-10664 add check for state before set call
This commit is contained in:
parent
f3636c573f
commit
ed0c468902
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user