summaryrefslogtreecommitdiffstats
path: root/java/test/TestH5Ocopy.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/test/TestH5Ocopy.java')
-rw-r--r--java/test/TestH5Ocopy.java40
1 files changed, 20 insertions, 20 deletions
diff --git a/java/test/TestH5Ocopy.java b/java/test/TestH5Ocopy.java
index 4888e76..8948115 100644
--- a/java/test/TestH5Ocopy.java
+++ b/java/test/TestH5Ocopy.java
@@ -36,13 +36,13 @@ public class TestH5Ocopy {
private static final String FILENAME = "testRefsattribute.h5";
private static final int DIM_X = 4;
private static final int DIM_Y = 6;
- long H5fid = -1;
- long H5dsid = -1;
- long H5did1 = -1;
- long H5did2 = -1;
- long H5gcpl = -1;
- long H5gid = -1;
- long H5dsid2 = -1;
+ long H5fid = HDF5Constants.H5I_INVALID_HID;
+ long H5dsid = HDF5Constants.H5I_INVALID_HID;
+ long H5did1 = HDF5Constants.H5I_INVALID_HID;
+ long H5did2 = HDF5Constants.H5I_INVALID_HID;
+ long H5gcpl = HDF5Constants.H5I_INVALID_HID;
+ long H5gid = HDF5Constants.H5I_INVALID_HID;
+ long H5dsid2 = HDF5Constants.H5I_INVALID_HID;
long[] dims = { 2 };
private final void _deleteFile(String filename) {
@@ -59,7 +59,7 @@ public class TestH5Ocopy {
}
private final long _createDataset(long fid, long dsid, String name, long dapl) {
- long did = -1;
+ long did = HDF5Constants.H5I_INVALID_HID;
try {
did = H5.H5Dcreate(fid, name,
HDF5Constants.H5T_STD_I32BE, dsid,
@@ -75,7 +75,7 @@ public class TestH5Ocopy {
}
private final long _createGroup(long fid, String name) {
- long gid = -1;
+ long gid = HDF5Constants.H5I_INVALID_HID;
try {
H5gcpl = HDF5Constants.H5P_DEFAULT;
gid = H5.H5Gcreate(fid, name, HDF5Constants.H5P_DEFAULT,
@@ -136,10 +136,10 @@ public class TestH5Ocopy {
@Test
public void testH5OcopyRefsAttr() {
- long ocp_plist_id = -1;
+ long ocp_plist_id = HDF5Constants.H5I_INVALID_HID;
byte rbuf0[]=null , rbuf1[] = null;
byte[] dset_data = new byte[16];
- long attribute_id = -1;
+ long attribute_id = HDF5Constants.H5I_INVALID_HID;
try {
@@ -184,9 +184,9 @@ public class TestH5Ocopy {
public void testH5OcopyRefsDatasettodiffFile() {
byte rbuf1[] = null;
byte[] dset_data = new byte[16];
- long ocp_plist_id = -1;
- long dataset_id = -1;
- long H5fid2 = -1;
+ long ocp_plist_id = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long H5fid2 = HDF5Constants.H5I_INVALID_HID;
try {
rbuf1 = H5.H5Rcreate(H5fid, "DS2", HDF5Constants.H5R_OBJECT, -1);
@@ -244,9 +244,9 @@ public class TestH5Ocopy {
public void testH5OcopyRefsDatasettosameFile() {
byte rbuf0[]=null , rbuf1[] = null;
byte[] dset_data = new byte[16];
- long ocp_plist_id = -1;
- long dataset_id = -1;
- long did = -1;
+ long ocp_plist_id = HDF5Constants.H5I_INVALID_HID;
+ long dataset_id = HDF5Constants.H5I_INVALID_HID;
+ long did = HDF5Constants.H5I_INVALID_HID;
int obj_type = -1;
byte[] read_data = new byte[16];
@@ -328,9 +328,9 @@ public class TestH5Ocopy {
// @Test(expected = HDF5LibraryException.class)
// public void testH5OcopyInvalidRef() throws Throwable {
// final long _pid_ = HDF5Constants.H5P_DEFAULT;
-// long sid = -1;
-// long did = -1;
-// long aid = -1;
+// long sid = HDF5Constants.H5I_INVALID_HID;
+// long did = HDF5Constants.H5I_INVALID_HID;
+// long aid = HDF5Constants.H5I_INVALID_HID;
//
// try {
// sid = H5.H5Screate_simple(1, new long[] {1}, null);