summaryrefslogtreecommitdiffstats
path: root/java/test/TestH5Fparams.java
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2019-01-04 20:31:51 (GMT)
committerLarry Knox <lrknox@hdfgroup.org>2019-01-04 20:31:51 (GMT)
commit0e34f0feaaeb6d2286f87f695f25fae45c070a42 (patch)
tree015b96091ae29c980a7b8e103f4299ec6db33288 /java/test/TestH5Fparams.java
parentb0feaecdb94739086f57981b5f80d3ceafcef183 (diff)
parent564565b15ed38d78cb7b29b8c9d9b322d224ab42 (diff)
downloadhdf5-0e34f0feaaeb6d2286f87f695f25fae45c070a42.zip
hdf5-0e34f0feaaeb6d2286f87f695f25fae45c070a42.tar.gz
hdf5-0e34f0feaaeb6d2286f87f695f25fae45c070a42.tar.bz2
Merge pull request #1433 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit '564565b15ed38d78cb7b29b8c9d9b322d224ab42': HDFFV-10664 update reference file HDFFV-10664 update reference files HDFFV-10664 add missing function and check for restriction
Diffstat (limited to 'java/test/TestH5Fparams.java')
-rw-r--r--java/test/TestH5Fparams.java49
1 files changed, 42 insertions, 7 deletions
diff --git a/java/test/TestH5Fparams.java b/java/test/TestH5Fparams.java
index 3d64aa9..40cbe4b 100644
--- a/java/test/TestH5Fparams.java
+++ b/java/test/TestH5Fparams.java
@@ -22,10 +22,12 @@ import java.io.File;
import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
+import hdf.hdf5lib.exceptions.HDF5FunctionArgumentException;
import hdf.hdf5lib.structs.H5F_info2_t;
import org.junit.After;
import org.junit.Before;
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TestName;
@@ -55,11 +57,6 @@ public class TestH5Fparams {
}
@Test(expected = NullPointerException.class)
- public void testH5Fis_hdf5_null() throws Throwable {
- H5.H5Fis_hdf5(null);
- }
-
- @Test(expected = NullPointerException.class)
public void testH5Fis_accessible_null() throws Throwable {
H5.H5Fis_accessible(null, -1);
}
@@ -74,7 +71,7 @@ public class TestH5Fparams {
H5.H5Funmount(-1, null);
}
- @Test
+ @Ignore
public void testH5Fis_hdf5_text() {
File txtFile = null;
boolean isH5 = false;
@@ -195,7 +192,7 @@ public class TestH5Fparams {
HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
- fail("H5.H5Fopen: " + err);
+ fail("H5.H5Fcreate: " + err);
}
try {
@@ -215,4 +212,42 @@ public class TestH5Fparams {
try {H5.H5Fclose(fid);} catch (Exception ex) {}
}
}
+
+ @Ignore//(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) {}
+ }
+ }
+
+ @Ignore//(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) {}
+ }
+ }
}