summaryrefslogtreecommitdiffstats
path: root/java/test/TestH5A.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/test/TestH5A.java')
-rw-r--r--java/test/TestH5A.java114
1 files changed, 57 insertions, 57 deletions
diff --git a/java/test/TestH5A.java b/java/test/TestH5A.java
index cff03f9..5ec773f 100644
--- a/java/test/TestH5A.java
+++ b/java/test/TestH5A.java
@@ -43,14 +43,14 @@ public class TestH5A {
private static final String H5_FILE = "testA.h5";
private static final int DIM_X = 4;
private static final int DIM_Y = 6;
- long H5fid = -1;
- long H5dsid = -1;
- long H5did = -1;
+ long H5fid = HDF5Constants.H5I_INVALID_HID;
+ long H5dsid = HDF5Constants.H5I_INVALID_HID;
+ long H5did = HDF5Constants.H5I_INVALID_HID;
long[] H5dims = { DIM_X, DIM_Y };
- long type_id = -1;
- long space_id = -1;
- long lapl_id = -1;
- long aapl_id = -1;
+ long type_id = HDF5Constants.H5I_INVALID_HID;
+ long space_id = HDF5Constants.H5I_INVALID_HID;
+ long lapl_id = HDF5Constants.H5I_INVALID_HID;
+ long aapl_id = HDF5Constants.H5I_INVALID_HID;
private final void _deleteFile(String filename) {
File file = new File(filename);
@@ -61,7 +61,7 @@ public class TestH5A {
}
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,
HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, dapl);
@@ -132,7 +132,7 @@ public class TestH5A {
@Test
public void testH5Acreate2() {
- long attr_id = -1;
+ long attr_id = HDF5Constants.H5I_INVALID_HID;
try {
attr_id = H5.H5Acreate(H5did, "dset", type_id, space_id, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
assertTrue("testH5Acreate2", attr_id >= 0);
@@ -160,8 +160,8 @@ public class TestH5A {
@Test
public void testH5Aopen() {
String attr_name = "dset";
- long attribute_id = -1;
- long attr_id = -1;
+ long attribute_id = HDF5Constants.H5I_INVALID_HID;
+ long attr_id = HDF5Constants.H5I_INVALID_HID;
try {
attr_id = H5.H5Acreate(H5did, attr_name, type_id, space_id,
@@ -197,8 +197,8 @@ public class TestH5A {
int idx_type = HDF5Constants.H5_INDEX_CRT_ORDER;
int order = HDF5Constants.H5_ITER_INC;
long n = 0;
- long attr_id = -1;
- long attribute_id = -1;
+ long attr_id = HDF5Constants.H5I_INVALID_HID;
+ long attribute_id = HDF5Constants.H5I_INVALID_HID;
try {
attr_id = H5.H5Acreate(H5did, "file", type_id, space_id,
@@ -256,7 +256,7 @@ public class TestH5A {
public void testH5Acreate_by_name() {
String obj_name = ".";
String attr_name = "DATASET";
- long attribute_id = -1;
+ long attribute_id = HDF5Constants.H5I_INVALID_HID;
boolean bool_val = false;
try {
@@ -288,7 +288,7 @@ public class TestH5A {
long loc_id = H5fid;
String old_attr_name = "old";
String new_attr_name = "new";
- long attr_id = -1;
+ long attr_id = HDF5Constants.H5I_INVALID_HID;
int ret_val = -1;
boolean bool_val = false;
@@ -326,7 +326,7 @@ public class TestH5A {
String obj_name = ".";
String old_attr_name = "old";
String new_attr_name = "new";
- long attr_id = -1;
+ long attr_id = HDF5Constants.H5I_INVALID_HID;
int ret_val = -1;
boolean bool_val = false;
@@ -368,7 +368,7 @@ public class TestH5A {
String obj_name = ".";
String attr_name = "DATASET1";
String ret_name = null;
- long attribute_id = -1;
+ long attribute_id = HDF5Constants.H5I_INVALID_HID;
try {
attribute_id = H5.H5Acreate_by_name(H5fid, obj_name, attr_name,
@@ -398,8 +398,8 @@ public class TestH5A {
int idx_type = HDF5Constants.H5_INDEX_NAME;
int order = HDF5Constants.H5_ITER_INC;
int n = 0;
- long attr1_id = -1;
- long attr2_id = -1;
+ long attr1_id = HDF5Constants.H5I_INVALID_HID;
+ long attr2_id = HDF5Constants.H5I_INVALID_HID;
try {
attr1_id = H5.H5Acreate_by_name(loc_id, obj_name, attr_name,
@@ -435,8 +435,8 @@ public class TestH5A {
@Test
public void testH5Aget_storage_size() {
- long attr_id = -1;
- long attr_size = -1;
+ long attr_id = HDF5Constants.H5I_INVALID_HID;
+ long attr_size = HDF5Constants.H5I_INVALID_HID;
try {
attr_id = H5.H5Acreate(H5did, "dset", type_id, space_id,
@@ -458,8 +458,8 @@ public class TestH5A {
@Test
public void testH5Aget_info() {
H5A_info_t attr_info = null;
- long attribute_id = -1;
- long attr_id = -1;
+ long attribute_id = HDF5Constants.H5I_INVALID_HID;
+ long attr_id = HDF5Constants.H5I_INVALID_HID;
try {
attr_id = H5.H5Acreate(H5did, "dset", type_id, space_id,
@@ -490,8 +490,8 @@ public class TestH5A {
@Test
public void testH5Aget_info1() {
H5A_info_t attr_info = null;
- long attribute_id = -1;
- long attr_id = -1;
+ long attribute_id = HDF5Constants.H5I_INVALID_HID;
+ long attr_id = HDF5Constants.H5I_INVALID_HID;
int order = HDF5Constants.H5_ITER_INC;
try {
@@ -526,8 +526,8 @@ public class TestH5A {
@Test
public void testH5Aget_info_by_idx() {
- long attr_id = -1;
- long attr2_id = -1;;
+ long attr_id = HDF5Constants.H5I_INVALID_HID;
+ long attr2_id = HDF5Constants.H5I_INVALID_HID;;
H5A_info_t attr_info = null;
try {
@@ -582,7 +582,7 @@ public class TestH5A {
@Test
public void testH5Aget_info_by_name() {
- long attr_id = -1;
+ long attr_id = HDF5Constants.H5I_INVALID_HID;
H5A_info_t attr_info = null;
String obj_name = ".";
String attr_name = "DATASET";
@@ -607,7 +607,7 @@ public class TestH5A {
@Test
public void testH5Adelete_by_name() {
- long attr_id = -1;
+ long attr_id = HDF5Constants.H5I_INVALID_HID;
int ret_val = -1;
boolean bool_val = false;
boolean exists = false;
@@ -650,8 +650,8 @@ public class TestH5A {
@Test
public void testH5Aexists() {
boolean exists = false;
- long attr_id = -1;
- long attribute_id = -1;
+ long attr_id = HDF5Constants.H5I_INVALID_HID;
+ long attribute_id = HDF5Constants.H5I_INVALID_HID;
try {
exists = H5.H5Aexists(H5fid, "None");
@@ -689,10 +689,10 @@ public class TestH5A {
@Test
public void testH5Adelete_by_idx_order() {
boolean exists = false;
- long attr1_id = -1;
- long attr2_id = -1;
- long attr3_id = -1;
- long attr4_id = -1;
+ long attr1_id = HDF5Constants.H5I_INVALID_HID;
+ long attr2_id = HDF5Constants.H5I_INVALID_HID;
+ long attr3_id = HDF5Constants.H5I_INVALID_HID;
+ long attr4_id = HDF5Constants.H5I_INVALID_HID;
try {
attr1_id = H5.H5Acreate_by_name(H5fid, ".", "attribute1",
@@ -731,9 +731,9 @@ public class TestH5A {
@Test
public void testH5Adelete_by_idx_name1() {
boolean exists = false;
- long attr1_id = -1;
- long attr2_id = -1;
- long attr3_id = -1;
+ long attr1_id = HDF5Constants.H5I_INVALID_HID;
+ long attr2_id = HDF5Constants.H5I_INVALID_HID;
+ long attr3_id = HDF5Constants.H5I_INVALID_HID;
try {
attr1_id = H5.H5Acreate_by_name(H5fid, ".", "attribute1",
@@ -766,10 +766,10 @@ public class TestH5A {
@Test
public void testH5Adelete_by_idx_name2() {
boolean exists = false;
- long attr1_id = -1;
- long attr2_id = -1;
- long attr3_id = -1;
- long attr4_id = -1;
+ long attr1_id = HDF5Constants.H5I_INVALID_HID;
+ long attr2_id = HDF5Constants.H5I_INVALID_HID;
+ long attr3_id = HDF5Constants.H5I_INVALID_HID;
+ long attr4_id = HDF5Constants.H5I_INVALID_HID;
try {
attr1_id = H5.H5Acreate_by_name(H5fid, ".", "attribute1",
@@ -821,8 +821,8 @@ public class TestH5A {
public void testH5Aopen_by_name() {
String obj_name = ".";
String attr_name = "DATASET";
- long attribute_id = -1;
- long aid = -1;
+ long attribute_id = HDF5Constants.H5I_INVALID_HID;
+ long aid = HDF5Constants.H5I_INVALID_HID;
try {
attribute_id = H5.H5Acreate_by_name(H5fid, obj_name, attr_name,
@@ -856,9 +856,9 @@ public class TestH5A {
@Test
public void testH5Awrite_readVL() {
String attr_name = "VLdata";
- long attr_id = -1;
- long atype_id = -1;
- long aspace_id = -1;
+ long attr_id = HDF5Constants.H5I_INVALID_HID;
+ long atype_id = HDF5Constants.H5I_INVALID_HID;
+ long aspace_id = HDF5Constants.H5I_INVALID_HID;
String[] str_data = { "Parting", "is such", "sweet", "sorrow." };
long[] dims = { str_data.length };
long lsize = 1;
@@ -923,8 +923,8 @@ public class TestH5A {
public void testH5Aget_create_plist() {
String attr_name = "DATASET1";
int char_encoding = 0;
- long plist_id = -1;
- long attribute_id = -1;
+ long plist_id = HDF5Constants.H5I_INVALID_HID;
+ long attribute_id = HDF5Constants.H5I_INVALID_HID;
try {
plist_id = H5.H5Pcreate(HDF5Constants.H5P_ATTRIBUTE_CREATE);
@@ -984,10 +984,10 @@ public class TestH5A {
@Test
public void testH5Aiterate() {
- long attr1_id = -1;
- long attr2_id = -1;
- long attr3_id = -1;
- long attr4_id = -1;
+ long attr1_id = HDF5Constants.H5I_INVALID_HID;
+ long attr2_id = HDF5Constants.H5I_INVALID_HID;
+ long attr3_id = HDF5Constants.H5I_INVALID_HID;
+ long attr4_id = HDF5Constants.H5I_INVALID_HID;
class idata {
public String attr_name = null;
@@ -1052,10 +1052,10 @@ public class TestH5A {
@Test
public void testH5Aiterate_by_name() {
- long attr1_id = -1;
- long attr2_id = -1;
- long attr3_id = -1;
- long attr4_id = -1;
+ long attr1_id = HDF5Constants.H5I_INVALID_HID;
+ long attr2_id = HDF5Constants.H5I_INVALID_HID;
+ long attr3_id = HDF5Constants.H5I_INVALID_HID;
+ long attr4_id = HDF5Constants.H5I_INVALID_HID;
class idata {
public String attr_name = null;