summaryrefslogtreecommitdiffstats
path: root/java/test/TestH5Fparams.java
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2019-01-06 07:45:15 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2019-01-06 07:45:15 (GMT)
commitaa62951a5fbbffa88185a58aea2b7526f5e66ce6 (patch)
tree210e7ae75fdb65fbcdc7c4049e6d80e9060b3f5b /java/test/TestH5Fparams.java
parente1b59919bb96f68f3b372a73790ecbe4ac3b395a (diff)
parent0e34f0feaaeb6d2286f87f695f25fae45c070a42 (diff)
downloadhdf5-aa62951a5fbbffa88185a58aea2b7526f5e66ce6.zip
hdf5-aa62951a5fbbffa88185a58aea2b7526f5e66ce6.tar.gz
hdf5-aa62951a5fbbffa88185a58aea2b7526f5e66ce6.tar.bz2
Merge branch 'develop' of https://bitbucket.hdfgroup.org/scm/~bmribler/hdf5_bmr_fixbug into develop
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) {}
+ }
+ }
}