diff options
| author | Allen Byrne <byrn@hdfgroup.org> | 2018-09-20 14:04:51 (GMT) |
|---|---|---|
| committer | Allen Byrne <byrn@hdfgroup.org> | 2018-09-20 14:04:51 (GMT) |
| commit | 569682b478a908a32d7277b25852c835c82ea563 (patch) | |
| tree | 20805737848c88d0f109af5c4a318d21ccce9403 /java/test/TestH5E.java | |
| parent | d2806d4875074efd03431385922480e27e32a060 (diff) | |
| parent | bbafe0debae9886988e4b7ec31bb8ef7292e43f9 (diff) | |
| download | hdf5-569682b478a908a32d7277b25852c835c82ea563.zip hdf5-569682b478a908a32d7277b25852c835c82ea563.tar.gz hdf5-569682b478a908a32d7277b25852c835c82ea563.tar.bz2 | |
Merging in latest from upstream (HDFFV/hdf5:refs/heads/develop)
* commit 'bbafe0debae9886988e4b7ec31bb8ef7292e43f9':
Remove extra constant
Fix typo
Add Constants to all ERR STK checks
Use constants for test comparisons
Develop normalization with vol_integration. Mostly peripheral things like the tools and wrappers, with just enough core library code to support that.
Diffstat (limited to 'java/test/TestH5E.java')
| -rw-r--r-- | java/test/TestH5E.java | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/java/test/TestH5E.java b/java/test/TestH5E.java index 656069a..f6db1ed 100644 --- a/java/test/TestH5E.java +++ b/java/test/TestH5E.java @@ -37,6 +37,10 @@ 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_MTY_CNT = 0; + long hdf_java_classid = -1; long current_stackid = -1; @@ -158,7 +162,7 @@ public class TestH5E { fail("H5.H5Epop: " + err); } - assertTrue("H5.H5Epop #:" + num_msg, num_msg == 0); + assertTrue("H5.H5Epop #:" + num_msg, num_msg == TestH5E.ERRSTACK_MTY_CNT); try { num_msg = H5.H5Eget_num(current_stackid); @@ -168,7 +172,7 @@ public class TestH5E { fail("H5.H5Epop: " + err); } - assertTrue("H5.H5Epop #:" + num_msg, num_msg == 4); + assertTrue("H5.H5Epop #:" + num_msg, num_msg == TestH5E.ERRSTACK_CNT); try { H5.H5Epop(current_stackid, 1); @@ -186,7 +190,7 @@ public class TestH5E { fail("H5.H5Epop: " + err); } - assertTrue("H5.H5Epop", num_msg == 3); + assertTrue("H5.H5Epop", num_msg == TestH5E.ERRSTACK_CNT - 1); } @Test @@ -227,7 +231,7 @@ public class TestH5E { try { num_msg = H5.H5Eget_num(estack_id); - assertTrue("testH5Epush #:" + num_msg, num_msg == 0); + assertTrue("testH5Epush #:" + num_msg, num_msg == TestH5E.ERRSTACK_MTY_CNT); } catch (Throwable err) { err.printStackTrace(); @@ -238,7 +242,7 @@ public class TestH5E { try { num_msg = H5.H5Eget_num(estack_id); - assertTrue("testH5Epush #:" + num_msg, num_msg == 1); + assertTrue("testH5Epush #:" + num_msg, num_msg == TestH5E.ERRSTACK_MTY_CNT + 1); } catch (Throwable err) { err.printStackTrace(); @@ -314,7 +318,7 @@ public class TestH5E { err.printStackTrace(); fail("testH5Ewalk:H5Eget_num " + err); } - assertTrue("testH5Ewalk #:" + num_msg, num_msg == 4); + assertTrue("testH5Ewalk #:" + num_msg, num_msg == TestH5E.ERRSTACK_CNT); try { H5.H5Ewalk2(current_stackid, HDF5Constants.H5E_WALK_UPWARD, walk_cb, walk_data); |
