Correct test

This commit is contained in:
Allen Byrne 2020-05-06 09:38:59 -05:00
parent 521c3f8ff6
commit c1565d2b57

View File

@ -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);
}
@ -99,7 +100,7 @@ public class TestH5E {
*/
String connector = System.getenv("HDF5_VOL_CONNECTOR");
if (connector == null)
assertEquals("H5.H5Eget_msg: ", "File accessibility", msg);
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);
}
@ -134,7 +136,7 @@ public class TestH5E {
*/
String connector = System.getenv("HDF5_VOL_CONNECTOR");
if (connector == null)
assertEquals("H5.H5Eget_msg: ", "Unable to open file", msg);
assertTrue("H5.H5Eget_msg: ", msg.contains("Unable to open file"));
}
catch (Throwable err) {
err.printStackTrace();