summaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2018-04-10 17:43:43 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2018-04-10 17:43:43 (GMT)
commita9662ba9fbe29c53d86f7bd2d1ec0547b2a154ac (patch)
tree6b7db8b493af9697ab8bfc87dda5ed958edb0a20 /java
parentf015c89c5e6b2482178fb0288f670be510cd0d23 (diff)
downloadhdf5-a9662ba9fbe29c53d86f7bd2d1ec0547b2a154ac.zip
hdf5-a9662ba9fbe29c53d86f7bd2d1ec0547b2a154ac.tar.gz
hdf5-a9662ba9fbe29c53d86f7bd2d1ec0547b2a154ac.tar.bz2
Move two more functions from unit tests
Diffstat (limited to 'java')
-rw-r--r--java/test/JUnit-interface.txt4
-rw-r--r--java/test/JUnit-unit.txt4
-rw-r--r--java/test/TestH5E.java56
-rw-r--r--java/test/TestH5Eparams.java56
4 files changed, 59 insertions, 61 deletions
diff --git a/java/test/JUnit-interface.txt b/java/test/JUnit-interface.txt
index 5d73768..4b35c0b 100644
--- a/java/test/JUnit-interface.txt
+++ b/java/test/JUnit-interface.txt
@@ -9,8 +9,6 @@ JUnit version 4.11
.testH5get_libversion
.testH5set_free_list_limits
.testH5EprintInt
-.testH5Eget_msg_major
-.testH5Eget_msg_minor
.testH5Eget_msg
.testH5Eget_num
.testH5Eget_class_name
@@ -56,6 +54,8 @@ JUnit version 4.11
.testH5Ecreate_msg_invalid_errid
.testH5Eclear2_invalid_stkid
.testH5Eprint2_invalid_classid
+.testH5Eget_msg_major
+.testH5Eget_msg_minor
.testH5Epush
.testH5Ewalk
.testH5Epop
diff --git a/java/test/JUnit-unit.txt b/java/test/JUnit-unit.txt
index fa33165..3e139cbe 100644
--- a/java/test/JUnit-unit.txt
+++ b/java/test/JUnit-unit.txt
@@ -9,8 +9,6 @@ JUnit version 4.11
.testH5get_libversion
.testH5set_free_list_limits
.testH5EprintInt
-.testH5Eget_msg_major
-.testH5Eget_msg_minor
.testH5Eget_msg
.testH5Eget_num
.testH5Eget_class_name
@@ -610,5 +608,5 @@ JUnit version 4.11
Time: XXXX
-OK (608 tests)
+OK (606 tests)
diff --git a/java/test/TestH5E.java b/java/test/TestH5E.java
index 1eb1914..aefddfa 100644
--- a/java/test/TestH5E.java
+++ b/java/test/TestH5E.java
@@ -73,6 +73,62 @@ public class TestH5E {
}
@Test
+ public void testH5Eget_msg_major() {
+
+ try {
+ H5.H5Fopen("test", 0, 1);
+ }
+ catch (HDF5LibraryException hdferr) {
+ int[] error_msg_type = { HDF5Constants.H5E_MAJOR };
+ String msg = null;
+ try {
+ msg = H5.H5Eget_msg(hdferr.getMajorErrorNumber(),
+ error_msg_type);
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("H5.H5Eget_msg: " + err);
+ }
+ assertNotNull("H5.H5Eget_msg: " + msg, msg);
+ assertEquals("H5.H5Eget_msg: ", "Object atom",
+ msg);
+ assertEquals("H5.H5Eget_msg: ", HDF5Constants.H5E_MAJOR,
+ error_msg_type[0]);
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("H5.H5Eget_msg: " + err);
+ }
+ }
+
+ @Test
+ public void testH5Eget_msg_minor() {
+ try {
+ H5.H5Fopen("test", 0, 1);
+ }
+ catch (HDF5LibraryException hdferr) {
+ int[] error_msg_type = { HDF5Constants.H5E_MINOR };
+ String msg = null;
+ try {
+ msg = H5.H5Eget_msg(hdferr.getMinorErrorNumber(),
+ error_msg_type);
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ 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: ", HDF5Constants.H5E_MINOR,
+ error_msg_type[0]);
+ }
+ catch (Throwable err) {
+ err.printStackTrace();
+ fail("H5.H5Eget_msg: " + err);
+ }
+ }
+
+ @Test
public void testH5Epop() {
try {
H5.H5Eset_current_stack(current_stackid);
diff --git a/java/test/TestH5Eparams.java b/java/test/TestH5Eparams.java
index fa9d776..e3c8b0e 100644
--- a/java/test/TestH5Eparams.java
+++ b/java/test/TestH5Eparams.java
@@ -170,62 +170,6 @@ public class TestH5Eparams {
}
@Test
- public void testH5Eget_msg_major() {
-
- try {
- H5.H5Fopen("test", 0, 1);
- }
- catch (HDF5LibraryException hdferr) {
- int[] error_msg_type = { HDF5Constants.H5E_MAJOR };
- String msg = null;
- try {
- msg = H5.H5Eget_msg(hdferr.getMajorErrorNumber(),
- error_msg_type);
- }
- catch (Throwable err) {
- err.printStackTrace();
- fail("H5.H5Eget_msg: " + err);
- }
- assertNotNull("H5.H5Eget_msg: " + msg, msg);
- assertEquals("H5.H5Eget_msg: ", "Object atom",
- msg);
- assertEquals("H5.H5Eget_msg: ", HDF5Constants.H5E_MAJOR,
- error_msg_type[0]);
- }
- catch (Throwable err) {
- err.printStackTrace();
- fail("H5.H5Eget_msg: " + err);
- }
- }
-
- @Test
- public void testH5Eget_msg_minor() {
- try {
- H5.H5Fopen("test", 0, 1);
- }
- catch (HDF5LibraryException hdferr) {
- int[] error_msg_type = { HDF5Constants.H5E_MINOR };
- String msg = null;
- try {
- msg = H5.H5Eget_msg(hdferr.getMinorErrorNumber(),
- error_msg_type);
- }
- catch (Throwable err) {
- err.printStackTrace();
- 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: ", HDF5Constants.H5E_MINOR,
- error_msg_type[0]);
- }
- catch (Throwable err) {
- err.printStackTrace();
- fail("H5.H5Eget_msg: " + err);
- }
- }
-
- @Test
public void testH5Ecreate_stack() {
long stk_id = -1;
try {