diff options
author | Quincey Koziol <koziol@lbl.gov> | 2020-08-16 16:49:15 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@lbl.gov> | 2020-08-16 16:49:15 (GMT) |
commit | a20bf599b682bfa0a91d571a922973e0c53b524a (patch) | |
tree | 10bc7fc1f4d90fa6a78a70c594e6cc0b4527fcea /java/test/TestH5E.java | |
parent | 83c861f32793ea6aaefbeaac870f46fdb09a3412 (diff) | |
parent | c81f01d5dcf7c010e92d3aaca990a14c8bc6961c (diff) | |
download | hdf5-a20bf599b682bfa0a91d571a922973e0c53b524a.zip hdf5-a20bf599b682bfa0a91d571a922973e0c53b524a.tar.gz hdf5-a20bf599b682bfa0a91d571a922973e0c53b524a.tar.bz2 |
Merge remote-tracking branch 'origin/develop' into pio_update
Diffstat (limited to 'java/test/TestH5E.java')
-rw-r--r-- | java/test/TestH5E.java | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/java/test/TestH5E.java b/java/test/TestH5E.java index 6f4f473..ac641c3 100644 --- a/java/test/TestH5E.java +++ b/java/test/TestH5E.java @@ -81,6 +81,7 @@ public class TestH5E { long errnum = hdferr.getMajorErrorNumber(); int[] error_msg_type = { HDF5Constants.H5E_MAJOR }; String msg = null; + try { msg = H5.H5Eget_msg(errnum, error_msg_type); } @@ -91,15 +92,15 @@ public class TestH5E { assertNotNull("H5.H5Eget_msg: " + msg, msg); assertEquals("H5.H5Eget_msg: ", HDF5Constants.H5E_MAJOR, error_msg_type[0]); - /* - * If HDF5_VOL_CONNECTOR is set, this might not be the - * native connector and the error string might be different. - * Only check for the specific error message if the native - * connector is being used. - */ - String connector = System.getenv("HDF5_VOL_CONNECTOR"); - if (connector == null) - assertEquals("H5.H5Eget_msg: ", "File accessibility", msg); + /* + * If HDF5_VOL_CONNECTOR is set, this might not be the + * native connector and the error string might be different. + * Only check for the specific error message if the native + * connector is being used. + */ + String connector = System.getenv("HDF5_VOL_CONNECTOR"); + if (connector == null) + assertTrue("H5.H5Eget_msg: ", msg.contains("File accessibility")); } catch (Throwable err) { err.printStackTrace(); @@ -116,6 +117,7 @@ public class TestH5E { long errnum = hdferr.getMinorErrorNumber(); int[] error_msg_type = { HDF5Constants.H5E_MINOR }; String msg = null; + try { msg = H5.H5Eget_msg(errnum, error_msg_type); } @@ -126,15 +128,15 @@ public class TestH5E { assertNotNull("H5.H5Eget_msg: " + msg, msg); assertEquals("H5.H5Eget_msg: ", HDF5Constants.H5E_MINOR, error_msg_type[0]); - /* - * If HDF5_VOL_CONNECTOR is set, this might not be the - * native connector and the error string might be different. - * Only check for the specific error message if the native - * connector is being used. - */ - String connector = System.getenv("HDF5_VOL_CONNECTOR"); - if (connector == null) - assertEquals("H5.H5Eget_msg: ", "Unable to open file", msg); + /* + * If HDF5_VOL_CONNECTOR is set, this might not be the + * native connector and the error string might be different. + * Only check for the specific error message if the native + * connector is being used. + */ + String connector = System.getenv("HDF5_VOL_CONNECTOR"); + if (connector == null) + assertTrue("H5.H5Eget_msg: ", msg.contains("Unable to open file")); } catch (Throwable err) { err.printStackTrace(); |