summaryrefslogtreecommitdiffstats
path: root/java/test
diff options
context:
space:
mode:
Diffstat (limited to 'java/test')
-rw-r--r--java/test/TestH5E.java14
-rw-r--r--java/test/TestH5Edefault.java22
-rw-r--r--java/test/testfiles/JUnit-TestH5Edefault.txt50
3 files changed, 52 insertions, 34 deletions
diff --git a/java/test/TestH5E.java b/java/test/TestH5E.java
index 1f4e658..542a092 100644
--- a/java/test/TestH5E.java
+++ b/java/test/TestH5E.java
@@ -38,7 +38,7 @@ import org.junit.rules.TestName;
public class TestH5E {
@Rule public TestName testname = new TestName();
- public static final int ERRSTACK_CNT = 3;
+ public static final int ERRSTACK_CNT = 6;
public static final int ERRSTACK_MTY_CNT = 0;
long hdf_java_classid = -1;
@@ -79,7 +79,7 @@ public class TestH5E {
public void testH5Eget_msg_major() {
try {
- H5.H5Fopen("test", 0, 1);
+ H5.H5Fopen("test", HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT);
}
catch (HDF5LibraryException hdferr) {
long errnum = hdferr.getMajorErrorNumber();
@@ -93,7 +93,7 @@ public class TestH5E {
fail("H5.H5Eget_msg(Throwable): " + err);
}
assertNotNull("H5.H5Eget_msg: " + msg, msg);
- assertEquals("H5.H5Eget_msg: ", "Object atom", msg);
+ assertEquals("H5.H5Eget_msg: ", "File accessibility", msg);
assertEquals("H5.H5Eget_msg: ", HDF5Constants.H5E_MAJOR, error_msg_type[0]);
}
catch (Throwable err) {
@@ -105,7 +105,7 @@ public class TestH5E {
@Test
public void testH5Eget_msg_minor() {
try {
- H5.H5Fopen("test", 0, 1);
+ H5.H5Fopen("test", HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT);
}
catch (HDF5LibraryException hdferr) {
long errnum = hdferr.getMinorErrorNumber();
@@ -119,7 +119,7 @@ public class TestH5E {
fail("H5.H5Eget_msg: " + err);
}
assertNotNull("H5.H5Eget_msg: " + msg, msg);
- assertEquals("H5.H5Eget_msg: ", "Unable to find atom information (already closed?)", msg);
+ assertEquals("H5.H5Eget_msg: ", "Unable to open file", msg);
assertEquals("H5.H5Eget_msg: ", HDF5Constants.H5E_MINOR, error_msg_type[0]);
}
catch (Throwable err) {
@@ -139,7 +139,7 @@ public class TestH5E {
}
try {
- H5.H5Fopen("test", 0, 1);
+ H5.H5Fopen("test", HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
}
@@ -297,7 +297,7 @@ public class TestH5E {
fail("testH5Ewalk:H5Eset_current_stack " + err);
}
try {
- H5.H5Fopen("test", 0, 1);
+ H5.H5Fopen("test", HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
}
diff --git a/java/test/TestH5Edefault.java b/java/test/TestH5Edefault.java
index b510936..4676205 100644
--- a/java/test/TestH5Edefault.java
+++ b/java/test/TestH5Edefault.java
@@ -29,7 +29,7 @@ import org.junit.rules.TestName;
public class TestH5Edefault {
@Rule public TestName testname = new TestName();
- public static final int ERRSTACK_CNT = 3;
+ public static final int ERRSTACK_CNT = 6;
public static final int ERRSTACK_MTY_CNT = 0;
@Before
@@ -59,7 +59,7 @@ public class TestH5Edefault {
@Test
public void testH5Eprint() {
try {
- H5.H5Fopen("test", 0, 1);
+ H5.H5Fopen("test", HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
}
@@ -79,7 +79,7 @@ public class TestH5Edefault {
long stack_id = -1;
long stack_id_default = HDF5Constants.H5E_DEFAULT;
try {
- H5.H5Fopen("test", 0, 1);
+ H5.H5Fopen("test", HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
//default stack id will be different after exception
@@ -142,7 +142,7 @@ public class TestH5Edefault {
long num_msg_default = -1;
long stack_id = -1;
try {
- H5.H5Fopen("test", 0, 1);
+ H5.H5Fopen("test", HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
//err.printStackTrace(); //This will clear the error stack
@@ -191,7 +191,7 @@ public class TestH5Edefault {
//Generate errors on default stack
try {
- H5.H5Fopen("test", 0, 1);
+ H5.H5Fopen("test", HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
//err.printStackTrace(); //This will clear the error stack
@@ -282,7 +282,7 @@ public class TestH5Edefault {
long num_msg = -1;
long stack_id = -1;
try {
- H5.H5Fopen("test", 0, 1);
+ H5.H5Fopen("test", HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
//err.printStackTrace(); //This will clear the error stack
@@ -321,7 +321,7 @@ public class TestH5Edefault {
//Generate errors on default stack
try {
- H5.H5Fopen("test", 0, 1);
+ H5.H5Fopen("test", HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
//err.printStackTrace(); //This will clear the error stack
@@ -378,7 +378,7 @@ public class TestH5Edefault {
public void testH5Epop() throws Throwable {
long num_msg = -1;
try {
- H5.H5Fopen("test", 0, 1);
+ H5.H5Fopen("test", HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
}
@@ -419,7 +419,7 @@ public class TestH5Edefault {
@Test
public void testH5EprintInt() {
try {
- H5.H5Fopen("test", 0, 1);
+ H5.H5Fopen("test", HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
}
@@ -463,7 +463,7 @@ public class TestH5Edefault {
public void testH5Eclear2_with_msg() {
long num_msg = -1;
try {
- H5.H5Fopen("test", 0, 1);
+ H5.H5Fopen("test", HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
}
@@ -526,7 +526,7 @@ public class TestH5Edefault {
public void testH5Eget_num_with_msg() {
long num_msg = -1;
try {
- H5.H5Fopen("test", 0, 1);
+ H5.H5Fopen("test", HDF5Constants.H5F_ACC_RDWR, HDF5Constants.H5P_DEFAULT);
}
catch (Throwable err) {
}
diff --git a/java/test/testfiles/JUnit-TestH5Edefault.txt b/java/test/testfiles/JUnit-TestH5Edefault.txt
index b39dbef..71d1431 100644
--- a/java/test/testfiles/JUnit-TestH5Edefault.txt
+++ b/java/test/testfiles/JUnit-TestH5Edefault.txt
@@ -34,21 +34,39 @@ OK (28 tests)
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
#000: (file name) line (number) in H5Fopen(): unable to open file
- major: File accessibilty
- minor: Unable to open file
- #001: (file name) line (number) in H5F_open(): unable to retrieve VFL class
- major: File accessibilty
- minor: Can't get value
- #002: (file name) line (number) in H5FD_get_class(): can't find object for ID
- major: Object atom
- minor: Unable to find atom information (already closed?)
+ major: File accessibility
+ minor: Unable to open file
+ #001: (file name) line (number) in H5VL_file_open(): open failed
+ major: Virtual Object Layer
+ minor: Unable to initialize object
+ #002: (file name) line (number) in H5VL_native_file_open(): unable to open file
+ major: File accessibility
+ minor: Unable to open file
+ #003: (file name) line (number) in H5F_open(): unable to open file: name = 'test', tent_flags = 1
+ major: File accessibility
+ minor: Unable to open file
+ #004: (file name) line (number) in H5FD_open(): open failed
+ major: Virtual File Layer
+ minor: Unable to initialize object
+ #005: (file name) line (number) in H5FD_sec2_open(): unable to open file: name = 'test', errno = 2, error message = 'No such file or directory', flags = 1, o_flags = 2
+ major: File accessibility
+ minor: Unable to open file
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
#000: (file name) line (number) in H5Fopen(): unable to open file
- major: File accessibilty
- minor: Unable to open file
- #001: (file name) line (number) in H5F_open(): unable to retrieve VFL class
- major: File accessibilty
- minor: Can't get value
- #002: (file name) line (number) in H5FD_get_class(): can't find object for ID
- major: Object atom
- minor: Unable to find atom information (already closed?)
+ major: File accessibility
+ minor: Unable to open file
+ #001: (file name) line (number) in H5VL_file_open(): open failed
+ major: Virtual Object Layer
+ minor: Unable to initialize object
+ #002: (file name) line (number) in H5VL_native_file_open(): unable to open file
+ major: File accessibility
+ minor: Unable to open file
+ #003: (file name) line (number) in H5F_open(): unable to open file: name = 'test', tent_flags = 1
+ major: File accessibility
+ minor: Unable to open file
+ #004: (file name) line (number) in H5FD_open(): open failed
+ major: Virtual File Layer
+ minor: Unable to initialize object
+ #005: (file name) line (number) in H5FD_sec2_open(): unable to open file: name = 'test', errno = 2, error message = 'No such file or directory', flags = 1, o_flags = 2
+ major: File accessibility
+ minor: Unable to open file