summaryrefslogtreecommitdiffstats
path: root/java/test/TestH5Gbasic.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/test/TestH5Gbasic.java')
-rw-r--r--java/test/TestH5Gbasic.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/java/test/TestH5Gbasic.java b/java/test/TestH5Gbasic.java
index aea417e..539b336 100644
--- a/java/test/TestH5Gbasic.java
+++ b/java/test/TestH5Gbasic.java
@@ -33,10 +33,10 @@ import org.junit.rules.TestName;
public class TestH5Gbasic {
@Rule public TestName testname = new TestName();
private static final String H5_FILE = "testGb.h5";
- long H5fid = -1;
+ long H5fid = HDF5Constants.H5I_INVALID_HID;
private final long _createGroup(long fid, String name) {
- long gid = -1;
+ long gid = HDF5Constants.H5I_INVALID_HID;
try {
gid = H5.H5Gcreate(fid, name, HDF5Constants.H5P_DEFAULT,
HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
@@ -85,7 +85,7 @@ public class TestH5Gbasic {
@Test(expected = NullPointerException.class)
public void testH5Gcreate_null() throws Throwable {
- long gid = -1;
+ long gid = HDF5Constants.H5I_INVALID_HID;
// it should fail because the group name is null
gid = H5.H5Gcreate(H5fid, null, HDF5Constants.H5P_DEFAULT,
@@ -102,7 +102,7 @@ public class TestH5Gbasic {
@Test
public void testH5Gcreate() {
- long gid = -1;
+ long gid = HDF5Constants.H5I_INVALID_HID;
try {
gid = H5.H5Gcreate(H5fid, "/testH5Gcreate",
HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT,
@@ -145,7 +145,7 @@ public class TestH5Gbasic {
@Test
public void testH5Gcreate_anon() {
- long gid = -1;
+ long gid = HDF5Constants.H5I_INVALID_HID;
try {
gid = H5.H5Gcreate_anon(H5fid, HDF5Constants.H5P_DEFAULT,
HDF5Constants.H5P_DEFAULT);
@@ -161,7 +161,7 @@ public class TestH5Gbasic {
@Test(expected = NullPointerException.class)
public void testH5Gopen_null() throws Throwable {
- long gid = -1;
+ long gid = HDF5Constants.H5I_INVALID_HID;
gid = H5.H5Gopen(H5fid, null, HDF5Constants.H5P_DEFAULT);
@@ -175,7 +175,7 @@ public class TestH5Gbasic {
@Test(expected = HDF5LibraryException.class)
public void testH5Gopen_not_exists() throws Throwable {
- long gid = -1;
+ long gid = HDF5Constants.H5I_INVALID_HID;
gid = H5.H5Gopen(H5fid, "Never_created", HDF5Constants.H5P_DEFAULT);
@@ -209,7 +209,7 @@ public class TestH5Gbasic {
@Test
public void testH5Gget_create_plist() {
- long pid = -1;
+ long pid = HDF5Constants.H5I_INVALID_HID;
long gid = _createGroup(H5fid, "/testH5Gcreate");
assertTrue(gid > 0);