HDFFV-10664 add missing function and check for restriction
This commit is contained in:
@@ -195,7 +195,7 @@ public class TestH5Fparams {
|
||||
HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
|
||||
}
|
||||
catch (Throwable err) {
|
||||
fail("H5.H5Fopen: " + err);
|
||||
fail("H5.H5Fcreate: " + err);
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -215,4 +215,42 @@ public class TestH5Fparams {
|
||||
try {H5.H5Fclose(fid);} catch (Exception ex) {}
|
||||
}
|
||||
}
|
||||
|
||||
@Test(expected = HDF5FunctionArgumentException.class)
|
||||
public void testH5Fset_libver_bounds_invalidlow() throws Throwable {
|
||||
long fid = -1;
|
||||
|
||||
try {
|
||||
try {
|
||||
fid = H5.H5Fcreate("test.h5", HDF5Constants.H5F_ACC_TRUNC,
|
||||
HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
|
||||
}
|
||||
catch (Throwable err) {
|
||||
fail("H5.H5Fcreate: " + err);
|
||||
}
|
||||
H5.H5Fset_libver_bounds(fid, 5, HDF5Constants.H5F_LIBVER_LATEST);
|
||||
}
|
||||
finally {
|
||||
try {H5.H5Fclose(fid);} catch (Exception ex) {}
|
||||
}
|
||||
}
|
||||
|
||||
@Test(expected = HDF5FunctionArgumentException.class)
|
||||
public void testH5Fset_libver_bounds_invalidhigh() throws Throwable {
|
||||
long fid = -1;
|
||||
|
||||
try {
|
||||
try {
|
||||
fid = H5.H5Fcreate("test.h5", HDF5Constants.H5F_ACC_TRUNC,
|
||||
HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
|
||||
}
|
||||
catch (Throwable err) {
|
||||
fail("H5.H5Fcreate: " + err);
|
||||
}
|
||||
H5.H5Fset_libver_bounds(fid, HDF5Constants.H5F_LIBVER_V110, HDF5Constants.H5F_LIBVER_V110+1);
|
||||
}
|
||||
finally {
|
||||
try {H5.H5Fclose(fid);} catch (Exception ex) {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user