summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/th5s.c59
-rw-r--r--test/tid.c46
-rw-r--r--test/titerate.c2
-rw-r--r--test/trefer.c240
-rw-r--r--test/tselect.c428
5 files changed, 416 insertions, 359 deletions
diff --git a/test/th5s.c b/test/th5s.c
index 613fff1..1059b96 100644
--- a/test/th5s.c
+++ b/test/th5s.c
@@ -1648,11 +1648,12 @@ test_h5s_compound_scalar_read(void)
/* Close file */
ret = H5Fclose(fid1);
CHECK(ret, FAIL, "H5Fclose");
-} /* test_h5s_compound_scalar_read() */
+} /* end test_h5s_compound_scalar_read() */
-/* Data arrays for chunk test */
-double chunk_data_dbl[50000][3];
-float chunk_data_flt[50000][3];
+
+/* Data array sizes for chunk test */
+#define CHUNK_DATA_NX 50000
+#define CHUNK_DATA_NY 3
/****************************************************************
**
@@ -1670,22 +1671,41 @@ test_h5s_chunk(void)
hid_t space_id;
hsize_t dims[2];
hsize_t csize[2];
+ double **chunk_data_dbl = NULL;
+ double *chunk_data_dbl_data = NULL;
+ float **chunk_data_flt = NULL;
+ float *chunk_data_flt_data = NULL;
int i,j;
+ /* Allocate memory */
+ chunk_data_dbl_data = (double *)HDcalloc(CHUNK_DATA_NX * CHUNK_DATA_NY, sizeof(double));
+ CHECK_PTR(chunk_data_dbl_data, "HDcalloc");
+ chunk_data_dbl = (double **)HDcalloc(CHUNK_DATA_NX, sizeof(chunk_data_dbl_data));
+ CHECK_PTR(chunk_data_dbl, "HDcalloc");
+ for (i = 0; i < CHUNK_DATA_NX; i++)
+ chunk_data_dbl[i] = chunk_data_dbl_data + (i * CHUNK_DATA_NY);
+
+ chunk_data_flt_data = (float *)HDcalloc(CHUNK_DATA_NX * CHUNK_DATA_NY, sizeof(float));
+ CHECK_PTR(chunk_data_flt_data, "HDcalloc");
+ chunk_data_flt = (float **)HDcalloc(CHUNK_DATA_NX, sizeof(chunk_data_flt_data));
+ CHECK_PTR(chunk_data_flt, "HDcalloc");
+ for (i = 0; i < CHUNK_DATA_NX; i++)
+ chunk_data_flt[i] = chunk_data_flt_data + (i * CHUNK_DATA_NY);
+
fileID = H5Fcreate(DATAFILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
CHECK(fileID, FAIL, "H5Fcreate");
plist_id = H5Pcreate(H5P_DATASET_CREATE);
CHECK(plist_id, FAIL, "H5Pcreate");
- csize[0] = 50000;
- csize[1] = 3;
+ csize[0] = CHUNK_DATA_NX;
+ csize[1] = CHUNK_DATA_NY;
status = H5Pset_chunk(plist_id, 2, csize);
CHECK(status, FAIL, "H5Pset_chunk");
/* Create the dataspace */
- dims[0] = 50000;
- dims[1] = 3;
+ dims[0] = CHUNK_DATA_NX;
+ dims[1] = CHUNK_DATA_NY;
space_id = H5Screate_simple(2, dims, NULL);
CHECK(space_id, FAIL, "H5Screate_simple");
@@ -1693,11 +1713,11 @@ test_h5s_chunk(void)
CHECK(dsetID, FAIL, "H5Dcreate2");
/* Initialize float array */
- for(i = 0; i < 50000; i++)
- for(j = 0; j < 3; j++)
+ for(i = 0; i < CHUNK_DATA_NX; i++)
+ for(j = 0; j < CHUNK_DATA_NY; j++)
chunk_data_flt[i][j] = (float)(i + 1) * 2.5F - (float)j * 100.3F;
- status = H5Dwrite(dsetID, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, chunk_data_flt);
+ status = H5Dwrite(dsetID, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, chunk_data_flt_data);
CHECK(status, FAIL, "H5Dwrite");
status = H5Pclose(plist_id);
@@ -1710,17 +1730,17 @@ test_h5s_chunk(void)
CHECK(status, FAIL, "H5Fclose");
/* Reset/initialize the data arrays to read in */
- HDmemset(chunk_data_dbl, 0, sizeof(double) * 50000 * 3);
- HDmemset(chunk_data_flt, 0, sizeof(float) * 50000 * 3);
+ HDmemset(chunk_data_dbl_data, 0, sizeof(double) * CHUNK_DATA_NX * CHUNK_DATA_NY);
+ HDmemset(chunk_data_flt_data, 0, sizeof(float) * CHUNK_DATA_NX * CHUNK_DATA_NY);
fileID = H5Fopen(DATAFILE, H5F_ACC_RDONLY, H5P_DEFAULT);
CHECK(fileID, FAIL, "H5Fopen");
dsetID = H5Dopen2(fileID, "coords", H5P_DEFAULT);
CHECK(dsetID, FAIL, "H5Dopen2");
- status= H5Dread(dsetID, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, chunk_data_dbl);
+ status= H5Dread(dsetID, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, chunk_data_dbl_data);
CHECK(status, FAIL, "H5Dread");
- status= H5Dread(dsetID, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, chunk_data_flt);
+ status= H5Dread(dsetID, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, chunk_data_flt_data);
CHECK(status, FAIL, "H5Dread");
status = H5Dclose(dsetID);
@@ -1728,13 +1748,18 @@ test_h5s_chunk(void)
status = H5Fclose(fileID);
CHECK(status, FAIL, "H5Fclose");
- for(i=0; i<50000; i++) {
- for(j=0; j<3; j++) {
+ for(i = 0; i < CHUNK_DATA_NX; i++) {
+ for(j = 0; j < CHUNK_DATA_NY; j++) {
/* Check if the two values are within 0.001% range. */
if(!H5_DBL_REL_EQUAL(chunk_data_dbl[i][j], (double)chunk_data_flt[i][j], (double)0.00001F))
TestErrPrintf("%u: chunk_data_dbl[%d][%d]=%e, chunk_data_flt[%d][%d]=%e\n", (unsigned)__LINE__, i, j, chunk_data_dbl[i][j], i, j, (double)chunk_data_flt[i][j]);
} /* end for */
} /* end for */
+
+ HDfree(chunk_data_dbl);
+ HDfree(chunk_data_dbl_data);
+ HDfree(chunk_data_flt);
+ HDfree(chunk_data_flt_data);
} /* test_h5s_chunk() */
/****************************************************************
diff --git a/test/tid.c b/test/tid.c
index 3587566..7a839d2 100644
--- a/test/tid.c
+++ b/test/tid.c
@@ -19,6 +19,13 @@
#define H5I_FRIEND /*suppress error about including H5Ipkg */
#include "H5Ipkg.h"
+static herr_t
+free_wrapper(void *p)
+{
+ HDfree(p);
+ return SUCCEED;
+}
+
/* Test basic functionality of registering and deleting types and IDs */
static int basic_id_test(void)
{
@@ -69,7 +76,7 @@ static int basic_id_test(void)
goto out;
/* Register a type */
- myType = H5Iregister_type((size_t)64, 0, (H5I_free_t) free );
+ myType = H5Iregister_type((size_t)64, 0, free_wrapper);
CHECK(myType, H5I_BADID, "H5Iregister_type");
if(myType == H5I_BADID)
@@ -163,7 +170,7 @@ static int basic_id_test(void)
H5E_END_TRY
/* Register another type and another object in that type */
- myType = H5Iregister_type((size_t)64, 0, (H5I_free_t) free );
+ myType = H5Iregister_type((size_t)64, 0, free_wrapper);
CHECK(myType, H5I_BADID, "H5Iregister_type");
if(myType == H5I_BADID)
@@ -238,7 +245,7 @@ out:
/* A dummy search function for the next test */
-static int test_search_func(void H5_ATTR_UNUSED * ptr1, void H5_ATTR_UNUSED * ptr2) { return 0; }
+static int test_search_func(void H5_ATTR_UNUSED * ptr1, hid_t H5_ATTR_UNUSED id, void H5_ATTR_UNUSED * ptr2) { return 0; }
/* Ensure that public functions cannot access "predefined" ID types */
static int id_predefined_test(void )
@@ -264,7 +271,7 @@ static int id_predefined_test(void )
goto out;
H5E_BEGIN_TRY
- testPtr = H5Isearch(H5I_GENPROP_LST, (H5I_search_func_t) test_search_func, testObj);
+ testPtr = H5Isearch(H5I_GENPROP_LST, test_search_func, testObj);
H5E_END_TRY
CHECK_PTR_NULL(testPtr, "H5Isearch");
@@ -295,7 +302,26 @@ static int id_predefined_test(void )
if(testErr >= 0)
goto out;
- /* Create a datatype ID and try to perform illegal functions on it */
+ H5E_BEGIN_TRY
+ testErr = H5Itype_exists(H5I_GROUP);
+ H5E_END_TRY
+
+ VERIFY(testErr, -1, "H5Itype_exists");
+ if(testErr != -1)
+ goto out;
+
+ H5E_BEGIN_TRY
+ testErr = H5Itype_exists(H5I_ATTR);
+ H5E_END_TRY
+
+ VERIFY(testErr, -1, "H5Itype_exists");
+ if(testErr != -1)
+ goto out;
+
+ /*
+ * Create a datatype ID and try to perform illegal functions on it
+ */
+
typeID = H5Tcreate(H5T_OPAQUE, (size_t)42);
CHECK(typeID, H5I_INVALID_HID, "H5Tcreate");
if(typeID == H5I_INVALID_HID)
@@ -473,7 +499,7 @@ static int test_id_type_list(void)
H5I_type_t testType;
int i; /* Just a counter variable */
- startType = H5Iregister_type((size_t)8, 0, (H5I_free_t) free );
+ startType = H5Iregister_type((size_t)8, 0, free_wrapper);
CHECK(startType, H5I_BADID, "H5Iregister_type");
if(startType == H5I_BADID)
goto out;
@@ -488,7 +514,7 @@ static int test_id_type_list(void)
/* Create types up to H5I_MAX_NUM_TYPES */
for(i = startType + 1; i < H5I_MAX_NUM_TYPES; i++)
{
- currentType = H5Iregister_type((size_t)8, 0, (H5I_free_t) free );
+ currentType = H5Iregister_type((size_t)8, 0, free_wrapper);
CHECK(currentType, H5I_BADID, "H5Iregister_type");
if(currentType == H5I_BADID)
goto out;
@@ -497,7 +523,7 @@ static int test_id_type_list(void)
/* Wrap around to low type ID numbers */
for(i = H5I_NTYPES; i < startType; i++)
{
- currentType = H5Iregister_type((size_t)8, 0, (H5I_free_t) free );
+ currentType = H5Iregister_type((size_t)8, 0, free_wrapper);
CHECK(currentType, H5I_BADID, "H5Iregister_type");
if(currentType == H5I_BADID)
goto out;
@@ -505,7 +531,7 @@ static int test_id_type_list(void)
/* There should be no room at the inn for a new ID type*/
H5E_BEGIN_TRY
- testType = H5Iregister_type((size_t)8, 0, (H5I_free_t) free );
+ testType = H5Iregister_type((size_t)8, 0, free_wrapper);
H5E_END_TRY
VERIFY(testType, H5I_BADID, "H5Iregister_type");
@@ -514,7 +540,7 @@ static int test_id_type_list(void)
/* Now delete a type and try to insert again */
H5Idestroy_type(H5I_NTYPES);
- testType = H5Iregister_type((size_t)8, 0, (H5I_free_t) free );
+ testType = H5Iregister_type((size_t)8, 0, free_wrapper);
VERIFY(testType, H5I_NTYPES, "H5Iregister_type");
if(testType != H5I_NTYPES)
diff --git a/test/titerate.c b/test/titerate.c
index 9ad145d..2f70226 100644
--- a/test/titerate.c
+++ b/test/titerate.c
@@ -939,7 +939,7 @@ static void test_links(hid_t fapl)
*-------------------------------------------------------------------------
*/
static int
-find_err_msg_cb(unsigned n, const H5E_error2_t *err_desc, void *_client_data)
+find_err_msg_cb(unsigned H5_ATTR_UNUSED n, const H5E_error2_t *err_desc, void *_client_data)
{
int status = H5_ITER_CONT;
searched_err_t *searched_err = (searched_err_t *)_client_data;
diff --git a/test/trefer.c b/test/trefer.c
index 61a57e0..426f549 100644
--- a/test/trefer.c
+++ b/test/trefer.c
@@ -93,19 +93,19 @@ test_reference_params(void)
/* Create file */
fid1 = H5Fcreate(FILE1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- CHECK(fid1, FAIL, "H5Fcreate");
+ CHECK(fid1, H5I_INVALID_HID, "H5Fcreate");
/* Create dataspace for datasets */
sid1 = H5Screate_simple(SPACE1_RANK, dims1, NULL);
- CHECK(sid1, FAIL, "H5Screate_simple");
+ CHECK(sid1, H5I_INVALID_HID, "H5Screate_simple");
/* Create dataset access property list */
dapl_id = H5Pcreate(H5P_DATASET_ACCESS);
- CHECK(dapl_id, FAIL, "H5Pcreate");
+ CHECK(dapl_id, H5I_INVALID_HID, "H5Pcreate");
/* Create a group */
group = H5Gcreate2(fid1, "Group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- CHECK(group, FAIL, "H5Gcreate2");
+ CHECK(group, H5I_INVALID_HID, "H5Gcreate2");
/* Set group's comment */
ret = H5Oset_comment(group, write_comment);
@@ -113,7 +113,7 @@ test_reference_params(void)
/* Create a dataset (inside Group1) */
dataset = H5Dcreate2(group, "Dataset1", H5T_NATIVE_UINT, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- CHECK(dataset, FAIL, "H5Dcreate2");
+ CHECK(dataset, H5I_INVALID_HID, "H5Dcreate2");
for(tu32 = (unsigned *)wbuf, i = 0; i < SPACE1_DIM1; i++)
*tu32++ = (unsigned)i * 3;
@@ -128,7 +128,7 @@ test_reference_params(void)
/* Create another dataset (inside Group1) */
dataset = H5Dcreate2(group, "Dataset2", H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- CHECK(dataset, FAIL, "H5Dcreate2");
+ CHECK(dataset, H5I_INVALID_HID, "H5Dcreate2");
/* Close Dataset */
ret = H5Dclose(dataset);
@@ -136,7 +136,7 @@ test_reference_params(void)
/* Create a datatype to refer to */
tid1 = H5Tcreate(H5T_COMPOUND, sizeof(s1_t));
- CHECK(tid1, FAIL, "H5Tcreate");
+ CHECK(tid1, H5I_INVALID_HID, "H5Tcreate");
/* Insert fields */
ret = H5Tinsert(tid1, "a", HOFFSET(s1_t,a), H5T_NATIVE_INT);
@@ -162,7 +162,7 @@ test_reference_params(void)
/* Create a dataset */
dataset = H5Dcreate2(fid1, "Dataset3", H5T_STD_REF_OBJ, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- CHECK(ret, FAIL, "H5Dcreate2");
+ CHECK(ret, H5I_INVALID_HID, "H5Dcreate2");
/* Test parameters to H5Rcreate */
ret = H5Rcreate(NULL, fid1, "/Group1/Dataset1", H5R_OBJECT, (hid_t)-1);
@@ -182,13 +182,13 @@ test_reference_params(void)
/* Test parameters to H5Rdereference */
dset2 = H5Rdereference2((hid_t)-1, H5P_DEFAULT, H5R_OBJECT, &rbuf[0]);
- VERIFY(dset2, FAIL, "H5Rdereference2 loc_id");
+ VERIFY(dset2, H5I_INVALID_HID, "H5Rdereference2 loc_id");
dset2 = H5Rdereference2(dataset, (hid_t)-1, H5R_OBJECT, &rbuf[0]);
- VERIFY(dset2, FAIL, "H5Rdereference2 oapl_id");
+ VERIFY(dset2, H5I_INVALID_HID, "H5Rdereference2 oapl_id");
dset2 = H5Rdereference2(dataset, dapl_id, H5R_OBJECT, NULL);
- VERIFY(dset2, FAIL, "H5Rdereference2 ref");
+ VERIFY(dset2, H5I_INVALID_HID, "H5Rdereference2 ref");
dset2 = H5Rdereference2(dataset, dapl_id, H5R_MAXTYPE, &rbuf[0]);
- VERIFY(dset2, FAIL, "H5Rdereference2 type");
+ VERIFY(dset2, H5I_INVALID_HID, "H5Rdereference2 type");
/* Test parameters to H5Rget_obj_type2 */
ret = H5Rget_obj_type2((hid_t)-1, H5R_OBJECT, &rbuf[0], NULL);
@@ -208,11 +208,11 @@ test_reference_params(void)
/* Test parameters to H5Rget_region */
ret_id = H5Rget_region((hid_t)-1, H5R_OBJECT, &rbuf[0]);
- VERIFY(ret_id, FAIL, "H5Rget_region loc_id");
+ VERIFY(ret_id, H5I_INVALID_HID, "H5Rget_region loc_id");
ret_id = H5Rget_region(fid1, H5R_OBJECT, NULL);
- VERIFY(ret_id, FAIL, "H5Rget_region ref");
+ VERIFY(ret_id, H5I_INVALID_HID, "H5Rget_region ref");
ret_id = H5Rget_region(fid1, H5R_OBJECT, &rbuf[0]);
- VERIFY(ret_id, FAIL, "H5Rget_region type");
+ VERIFY(ret_id, H5I_INVALID_HID, "H5Rget_region type");
/* Close disk dataspace */
ret = H5Sclose(sid1);
@@ -275,19 +275,19 @@ test_reference_obj(void)
/* Create file */
fid1 = H5Fcreate(FILE1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- CHECK(fid1, FAIL, "H5Fcreate");
+ CHECK(fid1, H5I_INVALID_HID, "H5Fcreate");
/* Create dataspace for datasets */
sid1 = H5Screate_simple(SPACE1_RANK, dims1, NULL);
- CHECK(sid1, FAIL, "H5Screate_simple");
+ CHECK(sid1, H5I_INVALID_HID, "H5Screate_simple");
/* Create dataset access property list */
dapl_id = H5Pcreate(H5P_DATASET_ACCESS);
- CHECK(dapl_id, FAIL, "H5Pcreate");
+ CHECK(dapl_id, H5I_INVALID_HID, "H5Pcreate");
/* Create a group */
group = H5Gcreate2(fid1, "Group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- CHECK(group, FAIL, "H5Gcreate2");
+ CHECK(group, H5I_INVALID_HID, "H5Gcreate2");
/* Set group's comment */
ret = H5Oset_comment(group, write_comment);
@@ -295,7 +295,7 @@ test_reference_obj(void)
/* Create a dataset (inside Group1) */
dataset = H5Dcreate2(group, "Dataset1", H5T_NATIVE_UINT, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- CHECK(dataset, FAIL, "H5Dcreate2");
+ CHECK(dataset, H5I_INVALID_HID, "H5Dcreate2");
for(tu32 = (unsigned *)wbuf, i = 0; i < SPACE1_DIM1; i++)
*tu32++ = (unsigned)i * 3;
@@ -318,7 +318,7 @@ test_reference_obj(void)
/* Create a datatype to refer to */
tid1 = H5Tcreate(H5T_COMPOUND, sizeof(s1_t));
- CHECK(tid1, FAIL, "H5Tcreate");
+ CHECK(tid1, H5I_INVALID_HID, "H5Tcreate");
/* Insert fields */
ret = H5Tinsert(tid1, "a", HOFFSET(s1_t,a), H5T_NATIVE_INT);
@@ -344,7 +344,7 @@ test_reference_obj(void)
/* Create a dataset */
dataset = H5Dcreate2(fid1, "Dataset3", H5T_STD_REF_OBJ, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- CHECK(ret, FAIL, "H5Dcreate2");
+ CHECK(dataset, H5I_INVALID_HID, "H5Dcreate2");
/* Create reference to dataset */
ret = H5Rcreate(&wbuf[0], fid1, "/Group1/Dataset1", H5R_OBJECT, (hid_t)-1);
@@ -392,11 +392,11 @@ test_reference_obj(void)
/* Re-open the file */
fid1 = H5Fopen(FILE1, H5F_ACC_RDWR, H5P_DEFAULT);
- CHECK(fid1, FAIL, "H5Fopen");
+ CHECK(fid1, H5I_INVALID_HID, "H5Fopen");
/* Open the dataset */
dataset = H5Dopen2(fid1, "/Dataset3", H5P_DEFAULT);
- CHECK(ret, FAIL, "H5Dopen2");
+ CHECK(dataset, H5I_INVALID_HID, "H5Dopen2");
/* Read selection from disk */
ret = H5Dread(dataset, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf);
@@ -404,11 +404,11 @@ test_reference_obj(void)
/* Open dataset object */
dset2 = H5Rdereference2(dataset, dapl_id, H5R_OBJECT, &rbuf[0]);
- CHECK(dset2, FAIL, "H5Rdereference2");
+ CHECK(dset2, H5I_INVALID_HID, "H5Rdereference2");
/* Check information in referenced dataset */
sid1 = H5Dget_space(dset2);
- CHECK(sid1, FAIL, "H5Dget_space");
+ CHECK(sid1, H5I_INVALID_HID, "H5Dget_space");
ret = (int)H5Sget_simple_extent_npoints(sid1);
VERIFY(ret, 4, "H5Sget_simple_extent_npoints");
@@ -426,11 +426,11 @@ test_reference_obj(void)
/* Open group object. GAPL isn't supported yet. But it's harmless to pass in */
group = H5Rdereference2(dataset, H5P_DEFAULT, H5R_OBJECT, &rbuf[2]);
- CHECK(group, FAIL, "H5Rdereference2");
+ CHECK(group, H5I_INVALID_HID, "H5Rdereference2");
/* Get group's comment */
size = H5Oget_comment(group, read_comment, (size_t)10);
- CHECK(size, FAIL, "H5Oget_comment");
+ CHECK(size, (-1), "H5Oget_comment");
/* Check for correct comment value */
if(HDstrcmp(write_comment, read_comment) != 0)
@@ -442,7 +442,7 @@ test_reference_obj(void)
/* Open datatype object. TAPL isn't supported yet. But it's harmless to pass in */
tid1 = H5Rdereference2(dataset, H5P_DEFAULT, H5R_OBJECT, &rbuf[3]);
- CHECK(tid1, FAIL, "H5Rdereference2");
+ CHECK(tid1, H5I_INVALID_HID, "H5Rdereference2");
/* Verify correct datatype */
{
@@ -542,7 +542,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
hdset_reg_ref_t wdata_NA[1], /* Write buffer */
rdata_NA[1]; /* Read buffer */
hsize_t numparticles = 8388608;
- hsize_t ret_particles;
+ hssize_t ret_particles;
unsigned num_dsets = 513;
hsize_t total_particles = numparticles * num_dsets;
hsize_t vdsdims[1] = {total_particles};
@@ -559,7 +559,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
/* Set to use the latest file format */
fapl = H5Pcreate(H5P_FILE_ACCESS);
- CHECK(fapl, FAIL, "H5Pcreate");
+ CHECK(fapl, H5I_INVALID_HID, "H5Pcreate");
/* Set the low/high version bounds in fapl */
ret = H5Pset_libver_bounds(fapl, libver_low, libver_high);
@@ -567,19 +567,19 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
/* Create file with the fapl */
fid1 = H5Fcreate(FILE2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
- CHECK(fid1, FAIL, "H5Fcreate");
+ CHECK(fid1, H5I_INVALID_HID, "H5Fcreate");
/* Create dataspace for datasets */
sid2 = H5Screate_simple(SPACE2_RANK, dims2, NULL);
- CHECK(sid2, FAIL, "H5Screate_simple");
+ CHECK(sid2, H5I_INVALID_HID, "H5Screate_simple");
/* Create dataset access property list */
dapl_id = H5Pcreate(H5P_DATASET_ACCESS);
- CHECK(dapl_id, FAIL, "H5Pcreate");
+ CHECK(dapl_id, H5I_INVALID_HID, "H5Pcreate");
/* Create a dataset */
dset2 = H5Dcreate2(fid1, "Dataset2", H5T_STD_U8LE, sid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- CHECK(dset2, FAIL, "H5Dcreate2");
+ CHECK(dset2, H5I_INVALID_HID, "H5Dcreate2");
for(tu8 = dwbuf, i = 0; i < (SPACE2_DIM1 * SPACE2_DIM2); i++)
*tu8++ = (uint8_t)(i * 3);
@@ -594,7 +594,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
/* Create dataspace with selection exceeding 32 bits */
sid3 = H5Screate_simple(1, vdsdims, NULL);
- CHECK(sid3, FAIL, "H5Screate_simple");
+ CHECK(sid3, H5I_INVALID_HID, "H5Screate_simple");
start3 = 0;
block3 = total_particles;
@@ -605,7 +605,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
/* Create the dataset with dataspace exceeding 32 bits */
dset3 = H5Dcreate2(fid1, "Dataset3", H5T_STD_U8LE, sid3, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- CHECK(dset3, FAIL, "H5Dcreate2");
+ CHECK(dset3, H5I_INVALID_HID, "H5Dcreate2");
/* Close Dataset */
ret = H5Dclose(dset3);
@@ -613,11 +613,11 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
/* Create dataspace for the reference dataset */
sid1 = H5Screate_simple(SPACE1_RANK, dims1, NULL);
- CHECK(sid1, FAIL, "H5Screate_simple");
+ CHECK(sid1, H5I_INVALID_HID, "H5Screate_simple");
/* Create a dataset */
dset1 = H5Dcreate2(fid1, "Dataset1", H5T_STD_REF_DSETREG, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- CHECK(ret, FAIL, "H5Dcreate2");
+ CHECK(ret, H5I_INVALID_HID, "H5Dcreate2");
/* Create references */
@@ -715,12 +715,12 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
/* Create the dataspace of the region references */
space_NA = H5Screate_simple(1, dims_NA, NULL);
- CHECK(space_NA, FAIL, "H5Screate_simple");
+ CHECK(space_NA, H5I_INVALID_HID, "H5Screate_simple");
/* Create the dataset and write the region references to it */
dset_NA = H5Dcreate2(fid1, "DS_NA", H5T_STD_REF_DSETREG, space_NA, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT);
- CHECK(dset_NA, FAIL, "H5Dcreate");
+ CHECK(dset_NA, H5I_INVALID_HID, "H5Dcreate");
/* Close and release resources for undefined region reference tests */
ret = H5Dclose(dset_NA);
@@ -749,7 +749,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
/* Re-open the file */
fid1 = H5Fopen(FILE2, H5F_ACC_RDWR, H5P_DEFAULT);
- CHECK(fid1, FAIL, "H5Fopen");
+ CHECK(fid1, H5I_INVALID_HID, "H5Fopen");
/*
* Start the test of an undefined reference
@@ -757,7 +757,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
/* Open the dataset of the undefined references */
dset_NA = H5Dopen2(fid1, "DS_NA", H5P_DEFAULT);
- CHECK(dset_NA, FAIL, "H5Dopen2");
+ CHECK(dset_NA, H5I_INVALID_HID, "H5Dopen2");
/* Read the data */
ret = H5Dread(dset_NA, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata_NA);
@@ -769,7 +769,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
H5E_BEGIN_TRY {
dset2 = H5Rdereference2(dset_NA, H5P_DEFAULT, H5R_DATASET_REGION, &rdata_NA[0]);
} H5E_END_TRY;
- VERIFY(dset2, FAIL, "H5Rdereference2");
+ VERIFY(dset2, H5I_INVALID_HID, "H5Rdereference2");
/* Close and release resources. */
ret = H5Dclose(dset_NA);
@@ -788,7 +788,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
/* Open the dataset */
dset1 = H5Dopen2(fid1, "/Dataset1", H5P_DEFAULT);
- CHECK(dset1, FAIL, "H5Dopen2");
+ CHECK(dset1, H5I_INVALID_HID, "H5Dopen2");
/* Read selection from disk */
ret = H5Dread(dset1, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf);
@@ -796,13 +796,13 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
/* Try to read an unaddressed dataset */
dset2 = H5Rdereference2(dset1, dapl_id, H5R_DATASET_REGION, &addr);
- VERIFY(dset2, FAIL, "H5Rdereference2 haddr_undef");
+ VERIFY(dset2, H5I_INVALID_HID, "H5Rdereference2 haddr_undef");
/* Try to open the referenced dataset with dataspace exceeding 32 bits */
if(libver_high == H5F_LIBVER_V110) {
dset3 = H5Rdereference2(dset1, dapl_id, H5R_DATASET_REGION, &rbuf[3]);
- CHECK(dset3, FAIL, "H5Rdereference2");
+ CHECK(dset3, H5I_INVALID_HID, "H5Rdereference2");
/* Check what H5Rget_obj_type2 function returns */
ret = H5Rget_obj_type2(dset1, H5R_DATASET_REGION, &rbuf[3], &obj_type);
@@ -811,7 +811,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
/* Check information in the referenced dataset */
sid3 = H5Dget_space(dset3);
- CHECK(sid3, FAIL, "H5Dget_space");
+ CHECK(sid3, H5I_INVALID_HID, "H5Dget_space");
ret_particles = H5Sget_select_npoints(sid3);
VERIFY(ret_particles, total_particles, "H5Sget_select_npoints");
@@ -824,7 +824,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
/* Try to open objects */
dset2 = H5Rdereference2(dset1, dapl_id, H5R_DATASET_REGION, &rbuf[0]);
- CHECK(dset2, FAIL, "H5Rdereference2");
+ CHECK(dset2, H5I_INVALID_HID, "H5Rdereference2");
/* Check what H5Rget_obj_type2 function returns */
ret = H5Rget_obj_type2(dset1, H5R_DATASET_REGION, &rbuf[0], &obj_type);
@@ -833,7 +833,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
/* Check information in referenced dataset */
sid1 = H5Dget_space(dset2);
- CHECK(sid1, FAIL, "H5Dget_space");
+ CHECK(sid1, H5I_INVALID_HID, "H5Dget_space");
ret = (int)H5Sget_simple_extent_npoints(sid1);
VERIFY(ret, 100, "H5Sget_simple_extent_npoints");
@@ -847,7 +847,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
/* Get the hyperslab selection */
sid2 = H5Rget_region(dset1, H5R_DATASET_REGION, &rbuf[0]);
- CHECK(sid2, FAIL, "H5Rget_region");
+ CHECK(sid2, H5I_INVALID_HID, "H5Rget_region");
/* Verify correct hyperslab selected */
ret = (int)H5Sget_select_npoints(sid2);
@@ -875,7 +875,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
/* Get the element selection */
sid2 = H5Rget_region(dset1, H5R_DATASET_REGION, &rbuf[1]);
- CHECK(sid2, FAIL, "H5Rget_region");
+ CHECK(sid2, H5I_INVALID_HID, "H5Rget_region");
/* Verify correct elements selected */
ret = (int)H5Sget_select_npoints(sid2);
@@ -921,7 +921,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
/* Get the unlimited selection */
if(libver_high == H5F_LIBVER_V110) {
sid2 = H5Rget_region(dset1, H5R_DATASET_REGION, &rbuf[2]);
- CHECK(sid2, FAIL, "H5Rget_region");
+ CHECK(sid2, H5I_INVALID_HID, "H5Rget_region");
/* Verify correct hyperslab selected */
hssize_ret = H5Sget_select_npoints(sid2);
@@ -1026,7 +1026,7 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
/* Create the file access property list */
fapl = H5Pcreate(H5P_FILE_ACCESS);
- CHECK(fapl, FAIL, "H5Pcreate");
+ CHECK(fapl, H5I_INVALID_HID, "H5Pcreate");
/* Set the low/high version bounds in fapl */
ret = H5Pset_libver_bounds(fapl, libver_low, libver_high);
@@ -1034,19 +1034,19 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
/* Create file with the fapl */
fid1 = H5Fcreate(FILE2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
- CHECK(fid1, FAIL, "H5Fcreate");
+ CHECK(fid1, H5I_INVALID_HID, "H5Fcreate");
/* Create dataspace for datasets */
sid3 = H5Screate_simple(SPACE3_RANK, dims3, NULL);
- CHECK(sid3, FAIL, "H5Screate_simple");
+ CHECK(sid3, H5I_INVALID_HID, "H5Screate_simple");
/* Create dataset access property list */
dapl_id = H5Pcreate(H5P_DATASET_ACCESS);
- CHECK(dapl_id, FAIL, "H5Pcreate");
+ CHECK(dapl_id, H5I_INVALID_HID, "H5Pcreate");
/* Create a dataset */
dset3 = H5Dcreate2(fid1, "Dataset2", H5T_STD_U8LE, sid3, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- CHECK(dset3, FAIL, "H5Dcreate2");
+ CHECK(dset3, H5I_INVALID_HID, "H5Dcreate2");
for(tu8 = dwbuf, i = 0; i < SPACE3_DIM1; i++)
*tu8++ = (uint8_t)(i * 3);
@@ -1061,11 +1061,11 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
/* Create dataspace for the reference dataset */
sid1 = H5Screate_simple(SPACE1_RANK, dims1, NULL);
- CHECK(sid1, FAIL, "H5Screate_simple");
+ CHECK(sid1, H5I_INVALID_HID, "H5Screate_simple");
/* Create a dataset */
dset1 = H5Dcreate2(fid1, "Dataset1", H5T_STD_REF_DSETREG, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- CHECK(ret, FAIL, "H5Dcreate2");
+ CHECK(dset1, H5I_INVALID_HID, "H5Dcreate2");
/* Create references */
@@ -1130,11 +1130,11 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
/* Re-open the file */
fid1 = H5Fopen(FILE2, H5F_ACC_RDWR, fapl);
- CHECK(fid1, FAIL, "H5Fopen");
+ CHECK(fid1, H5I_INVALID_HID, "H5Fopen");
/* Open the dataset */
dset1 = H5Dopen2(fid1, "/Dataset1", H5P_DEFAULT);
- CHECK(dset1, FAIL, "H5Dopen2");
+ CHECK(dset1, H5I_INVALID_HID, "H5Dopen2");
/* Read selection from disk */
ret = H5Dread(dset1, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf);
@@ -1142,7 +1142,7 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
/* Try to open objects */
dset3 = H5Rdereference2(dset1, dapl_id, H5R_DATASET_REGION, &rbuf[0]);
- CHECK(dset3, FAIL, "H5Rdereference2");
+ CHECK(dset3, H5I_INVALID_HID, "H5Rdereference2");
/* Check what H5Rget_obj_type2 function returns */
ret = H5Rget_obj_type2(dset1, H5R_DATASET_REGION, &rbuf[0], &obj_type);
@@ -1151,7 +1151,7 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
/* Check information in referenced dataset */
sid1 = H5Dget_space(dset3);
- CHECK(sid1, FAIL, "H5Dget_space");
+ CHECK(sid1, H5I_INVALID_HID, "H5Dget_space");
ret = (int)H5Sget_simple_extent_npoints(sid1);
VERIFY(ret, 100, "H5Sget_simple_extent_npoints");
@@ -1165,7 +1165,7 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
/* Get the hyperslab selection */
sid3 = H5Rget_region(dset1, H5R_DATASET_REGION, &rbuf[0]);
- CHECK(sid3, FAIL, "H5Rget_region");
+ CHECK(sid3, H5I_INVALID_HID, "H5Rget_region");
/* Verify correct hyperslab selected */
ret = (int)H5Sget_select_npoints(sid3);
@@ -1217,7 +1217,7 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
/* Get the element selection */
sid3 = H5Rget_region(dset1, H5R_DATASET_REGION, &rbuf[1]);
- CHECK(sid3, FAIL, "H5Rget_region");
+ CHECK(sid3, H5I_INVALID_HID, "H5Rget_region");
/* Verify correct elements selected */
ret = (int)H5Sget_select_npoints(sid3);
@@ -1298,15 +1298,15 @@ test_reference_obj_deleted(void)
/* Create file */
fid1 = H5Fcreate(FILE3, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- CHECK(fid1, FAIL, "H5Fcreate");
+ CHECK(fid1, H5I_INVALID_HID, "H5Fcreate");
/* Create scalar dataspace for datasets */
sid1 = H5Screate_simple(0, NULL, NULL);
- CHECK(sid1, FAIL, "H5Screate_simple");
+ CHECK(sid1, H5I_INVALID_HID, "H5Screate_simple");
/* Create a dataset to reference (deleted later) */
dataset = H5Dcreate2(fid1, "Dataset1", H5T_NATIVE_INT, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- CHECK(dataset, FAIL, "H5Dcreate2");
+ CHECK(dataset, H5I_INVALID_HID, "H5Dcreate2");
/* Close Dataset */
ret = H5Dclose(dataset);
@@ -1314,7 +1314,7 @@ test_reference_obj_deleted(void)
/* Create a dataset */
dataset = H5Dcreate2(fid1, "Dataset2", H5T_STD_REF_OBJ, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- CHECK(dataset, FAIL, "H5Dcreate2");
+ CHECK(dataset, H5I_INVALID_HID, "H5Dcreate2");
/* Create reference to dataset */
ret = H5Rcreate(&oref, fid1, "/Dataset1", H5R_OBJECT, (hid_t)-1);
@@ -1345,15 +1345,15 @@ test_reference_obj_deleted(void)
/* Re-open the file */
fid1 = H5Fopen(FILE3, H5F_ACC_RDWR, H5P_DEFAULT);
- CHECK(fid1, FAIL, "H5Fopen");
+ CHECK(fid1, H5I_INVALID_HID, "H5Fopen");
/* Open the dataset */
dataset = H5Dopen2(fid1, "/Dataset2", H5P_DEFAULT);
- CHECK(ret, FAIL, "H5Dopen2");
+ CHECK(ret, H5I_INVALID_HID, "H5Dopen2");
/* Open undefined reference */
dset2 = H5Rdereference2(dataset, H5P_DEFAULT, H5R_OBJECT, &addr);
- VERIFY(dset2, FAIL, "H5Rdereference2");
+ VERIFY(dset2, H5I_INVALID_HID, "H5Rdereference2");
/* Read selection from disk */
HDmemset(&oref, 0, sizeof(hobj_ref_t));
@@ -1362,12 +1362,12 @@ test_reference_obj_deleted(void)
/* Open deleted dataset object */
dset2 = H5Rdereference2(dataset, H5P_DEFAULT, H5R_OBJECT, &oref);
- VERIFY(dset2, FAIL, "H5Rdereference2");
+ VERIFY(dset2, H5I_INVALID_HID, "H5Rdereference2");
/* Open nonsense reference */
HDmemset(&oref, 0, sizeof(hobj_ref_t));
dset2 = H5Rdereference2(dataset, H5P_DEFAULT, H5R_OBJECT, &oref);
- VERIFY(dset2, FAIL, "H5Rdereference2");
+ VERIFY(dset2, H5I_INVALID_HID, "H5Rdereference2");
/* Close Dataset */
ret = H5Dclose(dataset);
@@ -1442,39 +1442,39 @@ test_reference_group(void)
/* Create file with a group and a dataset containing an object reference to the group */
fid = H5Fcreate(FILE1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- CHECK(fid, FAIL, "H5Fcreate");
+ CHECK(fid, H5I_INVALID_HID, "H5Fcreate");
/* Create dataspace to use for dataset */
sid = H5Screate(H5S_SCALAR);
- CHECK(sid, FAIL, "H5Screate");
+ CHECK(sid, H5I_INVALID_HID, "H5Screate");
/* Create group to refer to */
gid = H5Gcreate2(fid, GROUPNAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- CHECK(gid, FAIL, "H5Gcreate2");
+ CHECK(gid, H5I_INVALID_HID, "H5Gcreate2");
/* Create nested groups */
gid2 = H5Gcreate2(gid, GROUPNAME2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- CHECK(gid2, FAIL, "H5Gcreate2");
+ CHECK(gid2, H5I_INVALID_HID, "H5Gcreate2");
ret = H5Gclose(gid2);
CHECK(ret, FAIL, "H5Gclose");
gid2 = H5Gcreate2(gid, GROUPNAME3, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- CHECK(gid2, FAIL, "H5Gcreate2");
+ CHECK(gid2, H5I_INVALID_HID, "H5Gcreate2");
ret = H5Gclose(gid2);
CHECK(ret, FAIL, "H5Gclose");
/* Create bottom dataset */
did = H5Dcreate2(gid, DSETNAME2, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- assert(did > 0);
+ CHECK(did, H5I_INVALID_HID, "H5Dcreate2");
ret = H5Dclose(did);
- assert(ret >= 0);
+ CHECK(ret, FAIL, "H5Dclose");
ret = H5Gclose(gid);
CHECK(ret, FAIL, "H5Gclose");
/* Create dataset */
did = H5Dcreate2(fid, DSETNAME, H5T_STD_REF_OBJ, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- CHECK(did, FAIL, "H5Dcreate2");
+ CHECK(did, H5I_INVALID_HID, "H5Dcreate2");
/* Create reference to group */
ret = H5Rcreate(&wref, fid, GROUPNAME, H5R_OBJECT, (hid_t)-1);
@@ -1495,11 +1495,11 @@ test_reference_group(void)
/* Re-open file */
fid = H5Fopen(FILE1, H5F_ACC_RDWR, H5P_DEFAULT);
- CHECK(fid, FAIL, "H5Fopen");
+ CHECK(fid, H5I_INVALID_HID, "H5Fopen");
/* Re-open dataset */
did = H5Dopen2(fid, DSETNAME, H5P_DEFAULT);
- CHECK(did, FAIL, "H5Dopen2");
+ CHECK(did, H5I_INVALID_HID, "H5Dopen2");
/* Read in the reference */
ret = H5Dread(did, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, &rref);
@@ -1507,7 +1507,7 @@ test_reference_group(void)
/* Dereference to get the group */
gid = H5Rdereference2(did, H5P_DEFAULT, H5R_OBJECT, &rref);
- CHECK(gid, FAIL, "H5Rdereference2");
+ CHECK(gid, H5I_INVALID_HID, "H5Rdereference2");
/* Iterate through objects in dereferenced group */
ret = H5Literate(gid, H5_INDEX_NAME, H5_ITER_INC, NULL, test_deref_iter_op, &count);
@@ -1519,7 +1519,7 @@ test_reference_group(void)
VERIFY(ginfo.nlinks, 3, "H5Gget_info");
size = H5Lget_name_by_idx(gid, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)0, objname, (size_t)NAME_SIZE, H5P_DEFAULT);
- CHECK(size, FAIL, "H5Lget_name_by_idx");
+ CHECK(size, (-1), "H5Lget_name_by_idx");
VERIFY_STR(objname, DSETNAME2, "H5Lget_name_by_idx");
ret = H5Oget_info_by_idx2(gid, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)0, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT);
@@ -1664,23 +1664,23 @@ test_reference_compat(void)
/* Create file */
fid1 = H5Fcreate(FILE1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
- CHECK(fid1, FAIL, "H5Fcreate");
+ CHECK(fid1, H5I_INVALID_HID, "H5Fcreate");
/* Create dataspace for datasets */
sid1 = H5Screate_simple(SPACE1_RANK, dims1, NULL);
- CHECK(sid1, FAIL, "H5Screate_simple");
+ CHECK(sid1, H5I_INVALID_HID, "H5Screate_simple");
/* Create another dataspace for datasets */
sid2 = H5Screate_simple(SPACE2_RANK, dims2, NULL);
- CHECK(sid2, FAIL, "H5Screate_simple");
+ CHECK(sid2, H5I_INVALID_HID, "H5Screate_simple");
/* Create a group */
group = H5Gcreate2(fid1, "Group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- CHECK(group, FAIL, "H5Gcreate2");
+ CHECK(group, H5I_INVALID_HID, "H5Gcreate2");
/* Create a dataset (inside Group1) */
dataset = H5Dcreate2(group, "Dataset1", H5T_NATIVE_UINT, sid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- CHECK(dataset, FAIL, "H5Dcreate2");
+ CHECK(dataset, H5I_INVALID_HID, "H5Dcreate2");
/* Close Dataset */
ret = H5Dclose(dataset);
@@ -1688,7 +1688,7 @@ test_reference_compat(void)
/* Create another dataset (inside Group1) */
dataset = H5Dcreate2(group, "Dataset2", H5T_NATIVE_UCHAR, sid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- CHECK(dataset, FAIL, "H5Dcreate2");
+ CHECK(dataset, H5I_INVALID_HID, "H5Dcreate2");
/* Close Dataset */
ret = H5Dclose(dataset);
@@ -1696,7 +1696,7 @@ test_reference_compat(void)
/* Create a datatype to refer to */
tid1 = H5Tcreate(H5T_COMPOUND, sizeof(s1_t));
- CHECK(tid1, FAIL, "H5Tcreate");
+ CHECK(tid1, H5I_INVALID_HID, "H5Tcreate");
/* Insert fields */
ret = H5Tinsert(tid1, "a", HOFFSET(s1_t,a), H5T_NATIVE_INT);
@@ -1720,25 +1720,24 @@ test_reference_compat(void)
ret = H5Gclose(group);
CHECK(ret, FAIL, "H5Gclose");
-
/* Create a dataset with object reference datatype */
dataset = H5Dcreate2(fid1, "Dataset3", H5T_STD_REF_OBJ, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- CHECK(ret, FAIL, "H5Dcreate2");
+ CHECK(dataset, H5I_INVALID_HID, "H5Dcreate2");
/* Create reference to dataset */
- ret = H5Rcreate(&wbuf_obj[0], fid1, "/Group1/Dataset1", H5R_OBJECT, (hid_t)-1);
+ ret = H5Rcreate(&wbuf_obj[0], fid1, "/Group1/Dataset1", H5R_OBJECT, H5I_INVALID_HID);
CHECK(ret, FAIL, "H5Rcreate");
/* Create reference to dataset */
- ret = H5Rcreate(&wbuf_obj[1], fid1, "/Group1/Dataset2", H5R_OBJECT, (hid_t)-1);
+ ret = H5Rcreate(&wbuf_obj[1], fid1, "/Group1/Dataset2", H5R_OBJECT, H5I_INVALID_HID);
CHECK(ret, FAIL, "H5Rcreate");
/* Create reference to group */
- ret = H5Rcreate(&wbuf_obj[2], fid1, "/Group1", H5R_OBJECT, (hid_t)-1);
+ ret = H5Rcreate(&wbuf_obj[2], fid1, "/Group1", H5R_OBJECT, H5I_INVALID_HID);
CHECK(ret, FAIL, "H5Rcreate");
/* Create reference to named datatype */
- ret = H5Rcreate(&wbuf_obj[3], fid1, "/Group1/Datatype1", H5R_OBJECT, (hid_t)-1);
+ ret = H5Rcreate(&wbuf_obj[3], fid1, "/Group1/Datatype1", H5R_OBJECT, H5I_INVALID_HID);
CHECK(ret, FAIL, "H5Rcreate");
/* Write references to disk */
@@ -1749,16 +1748,19 @@ test_reference_compat(void)
ret = H5Dclose(dataset);
CHECK(ret, FAIL, "H5Dclose");
-
/* Create a dataset with region reference datatype */
dataset = H5Dcreate2(fid1, "Dataset4", H5T_STD_REF_DSETREG, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- CHECK(ret, FAIL, "H5Dcreate2");
+ CHECK(dataset, H5I_INVALID_HID, "H5Dcreate2");
/* Select 6x6 hyperslab for first reference */
- start[0] = 2; start[1] = 2;
- stride[0] = 1; stride[1] = 1;
- count[0] = 1; count[1] = 1;
- block[0] = 6; block[1] = 6;
+ start[0] = 2;
+ start[1] = 2;
+ stride[0] = 1;
+ stride[1] = 1;
+ count[0] = 1;
+ count[1] = 1;
+ block[0] = 6;
+ block[1] = 6;
ret = H5Sselect_hyperslab(sid2, H5S_SELECT_SET, start, stride, count, block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
@@ -1792,7 +1794,6 @@ test_reference_compat(void)
ret = H5Dclose(dataset);
CHECK(ret, FAIL, "H5Dclose");
-
/* Close disk dataspaces */
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
@@ -1803,14 +1804,13 @@ test_reference_compat(void)
ret = H5Fclose(fid1);
CHECK(ret, FAIL, "H5Fclose");
-
/* Re-open the file */
fid1 = H5Fopen(FILE1, H5F_ACC_RDWR, H5P_DEFAULT);
- CHECK(fid1, FAIL, "H5Fopen");
+ CHECK(fid1, H5I_INVALID_HID, "H5Fopen");
/* Open the object reference dataset */
dataset = H5Dopen2(fid1, "/Dataset3", H5P_DEFAULT);
- CHECK(ret, FAIL, "H5Dopen2");
+ CHECK(dataset, H5I_INVALID_HID, "H5Dopen2");
/* Read selection from disk */
ret = H5Dread(dataset, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf_obj);
@@ -1836,25 +1836,25 @@ test_reference_compat(void)
/* Make sure the referenced objects can be opened */
dset2 = H5Rdereference1(dataset, H5R_OBJECT, &rbuf_obj[0]);
- CHECK(dset2, FAIL, "H5Rdereference1");
+ CHECK(dset2, H5I_INVALID_HID, "H5Rdereference1");
ret = H5Dclose(dset2);
CHECK(ret, FAIL, "H5Dclose");
dset2 = H5Rdereference1(dataset, H5R_OBJECT, &rbuf_obj[1]);
- CHECK(dset2, FAIL, "H5Rdereference1");
+ CHECK(dset2, H5I_INVALID_HID, "H5Rdereference1");
ret = H5Dclose(dset2);
CHECK(ret, FAIL, "H5Dclose");
group2 = H5Rdereference1(dataset, H5R_OBJECT, &rbuf_obj[2]);
- CHECK(group2, FAIL, "H5Rdereference1");
+ CHECK(group2, H5I_INVALID_HID, "H5Rdereference1");
ret = H5Gclose(group2);
CHECK(ret, FAIL, "H5Gclose");
tid2 = H5Rdereference1(dataset, H5R_OBJECT, &rbuf_obj[3]);
- CHECK(tid2, FAIL, "H5Rdereference1");
+ CHECK(tid2, H5I_INVALID_HID, "H5Rdereference1");
ret = H5Tclose(tid2);
CHECK(ret, FAIL, "H5Tclose");
@@ -1866,7 +1866,7 @@ test_reference_compat(void)
/* Open the dataset region reference dataset */
dataset = H5Dopen2(fid1, "/Dataset4", H5P_DEFAULT);
- CHECK(ret, FAIL, "H5Dopen2");
+ CHECK(dataset, H5I_INVALID_HID, "H5Dopen2");
/* Read selection from disk */
ret = H5Dread(dataset, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf_reg);
@@ -1889,13 +1889,13 @@ test_reference_compat(void)
/* Make sure the referenced objects can be opened */
dset2 = H5Rdereference1(dataset, H5R_DATASET_REGION, &rbuf_reg[0]);
- CHECK(dset2, FAIL, "H5Rdereference1");
+ CHECK(dset2, H5I_INVALID_HID, "H5Rdereference1");
ret = H5Dclose(dset2);
CHECK(ret, FAIL, "H5Dclose");
dset2 = H5Rdereference1(dataset, H5R_DATASET_REGION, &rbuf_reg[1]);
- CHECK(dset2, FAIL, "H5Rdereference1");
+ CHECK(dset2, H5I_INVALID_HID, "H5Rdereference1");
ret = H5Dclose(dset2);
CHECK(ret, FAIL, "H5Dclose");
@@ -1973,8 +1973,8 @@ test_reference(void)
void
cleanup_reference(void)
{
- remove(FILE1);
- remove(FILE2);
- remove(FILE3);
+ HDremove(FILE1);
+ HDremove(FILE2);
+ HDremove(FILE3);
}
diff --git a/test/tselect.c b/test/tselect.c
index 450078f..7ef7ea9 100644
--- a/test/tselect.c
+++ b/test/tselect.c
@@ -869,7 +869,7 @@ test_select_all_hyper(hid_t xfer_plist)
/* Select no extent for disk dataset */
ret = H5Sselect_none(sid1);
- CHECK(ret, FAIL, "H5Sselect_all");
+ CHECK(ret, FAIL, "H5Sselect_none");
/* Read selection from disk (should fail with no selection defined) */
ret=H5Dread(dataset,H5T_NATIVE_UCHAR,sid2,sid1,xfer_plist,rbuf);
@@ -890,7 +890,7 @@ test_select_all_hyper(hid_t xfer_plist)
/* A quick check to make certain that iterating through a "none" selection works */
ret = H5Sselect_none(sid2);
- CHECK(ret, FAIL, "H5Sselect_all");
+ CHECK(ret, FAIL, "H5Sselect_none");
ret = H5Diterate(rbuf,H5T_NATIVE_UCHAR,sid2,test_select_none_iter1,&tbuf);
CHECK(ret, FAIL, "H5Diterate");
@@ -1606,7 +1606,7 @@ test_select_hyper_contig3(hid_t dset_type, hid_t xfer_plist)
****************************************************************/
static void
verify_select_hyper_contig_dr__run_test(const uint16_t *cube_buf,
- size_t cube_size, unsigned edge_size, unsigned cube_rank)
+ size_t H5_ATTR_NDEBUG_UNUSED cube_size, unsigned edge_size, unsigned cube_rank)
{
const uint16_t *cube_ptr; /* Pointer into the cube buffer */
uint16_t expected_value; /* Expected value in dataset */
@@ -1660,10 +1660,10 @@ verify_select_hyper_contig_dr__run_test(const uint16_t *cube_buf,
/****************************************************************
**
** test_select_hyper_contig_dr__run_test(): Test H5S (dataspace)
-** selection code with contiguous source and target having
-** different ranks but the same shape. We have already
-** tested H5S_shape_same in isolation, so now we try to do
-** I/O.
+** selection code with contiguous source and target having
+** different ranks but the same shape. We have already
+** tested H5S_select_shape_same in isolation, so now we try to do
+** I/O.
**
****************************************************************/
static void
@@ -2307,10 +2307,10 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
/****************************************************************
**
** test_select_hyper_contig_dr(): Test H5S (dataspace)
-** selection code with contiguous source and target having
-** different ranks but the same shape. We have already
-** tested H5S_shape_same in isolation, so now we try to do
-** I/O.
+** selection code with contiguous source and target having
+** different ranks but the same shape. We have already
+** tested H5S_select_shape_same in isolation, so now we try to do
+** I/O.
**
****************************************************************/
static void
@@ -2731,9 +2731,9 @@ test_select_hyper_checker_board_dr__verify_data(uint16_t * buf_ptr,
**
** test_select_hyper_checker_board_dr__run_test(): Test H5S
** (dataspace) selection code with checker board source and
-** target selections having different ranks but the same
-** shape. We have already tested H5S_shape_same in
-** isolation, so now we try to do I/O.
+** target selections having different ranks but the same
+** shape. We have already tested H5S_select_shape_same in
+** isolation, so now we try to do I/O.
**
****************************************************************/
static void
@@ -3535,10 +3535,10 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
/****************************************************************
**
** test_select_hyper_checker_board_dr(): Test H5S (dataspace)
-** selection code with checkerboard source and target having
-** different ranks but the same shape. We have already
-** tested H5S_shape_same in isolation, so now we try to do
-** I/O.
+** selection code with checkerboard source and target having
+** different ranks but the same shape. We have already
+** tested H5S_select_shape_same in isolation, so now we try to do
+** I/O.
**
** This is just an initial smoke check, so we will work
** with a slice through a cube only.
@@ -5151,8 +5151,8 @@ test_select_hyper_union_3d(void)
*tbuf, /* temporary buffer pointer */
*tbuf2; /* temporary buffer pointer */
int i,j,k; /* Counters */
- herr_t ret; /* Generic return value */
- hsize_t npoints; /* Number of elements in selection */
+ herr_t ret; /* Generic return value */
+ hsize_t npoints; /* Number of elements in selection */
/* Output message about test being performed */
MESSAGE(5, ("Testing Hyperslab Selection Functions with unions of 3-D hyperslabs\n"));
@@ -5287,22 +5287,22 @@ test_select_hyper_union_3d(void)
static void
test_select_hyper_and_2d(void)
{
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1,sid2; /* Dataspace ID */
- hsize_t dims1[] = {SPACE2_DIM1, SPACE2_DIM2};
- hsize_t dims2[] = {SPACE2A_DIM1};
- hsize_t start[SPACE2_RANK]; /* Starting location of hyperslab */
- hsize_t stride[SPACE2_RANK]; /* Stride of hyperslab */
- hsize_t count[SPACE2_RANK]; /* Element count of hyperslab */
- hsize_t block[SPACE2_RANK]; /* Block size of hyperslab */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1,sid2; /* Dataspace ID */
+ hsize_t dims1[] = {SPACE2_DIM1, SPACE2_DIM2};
+ hsize_t dims2[] = {SPACE2A_DIM1};
+ hsize_t start[SPACE2_RANK]; /* Starting location of hyperslab */
+ hsize_t stride[SPACE2_RANK]; /* Stride of hyperslab */
+ hsize_t count[SPACE2_RANK]; /* Element count of hyperslab */
+ hsize_t block[SPACE2_RANK]; /* Block size of hyperslab */
uint8_t *wbuf, /* buffer to write to disk */
*rbuf, /* buffer read from disk */
*tbuf, /* temporary buffer pointer */
*tbuf2; /* temporary buffer pointer */
int i,j; /* Counters */
- herr_t ret; /* Generic return value */
- hssize_t npoints; /* Number of elements in selection */
+ herr_t ret; /* Generic return value */
+ hssize_t npoints; /* Number of elements in selection */
/* Output message about test being performed */
MESSAGE(5, ("Testing Hyperslab Selection Functions with intersection of 2-D hyperslabs\n"));
@@ -5837,20 +5837,20 @@ test_select_hyper_iter2(void *_elem, hid_t H5_ATTR_UNUSED type_id, unsigned ndim
static void
test_select_hyper_union_random_5d(hid_t read_plist)
{
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1,sid2; /* Dataspace ID */
- hsize_t dims1[] = {SPACE5_DIM1, SPACE5_DIM2, SPACE5_DIM3, SPACE5_DIM4, SPACE5_DIM5};
- hsize_t dims2[] = {SPACE6_DIM1};
- hsize_t start[SPACE5_RANK]; /* Starting location of hyperslab */
- hsize_t count[SPACE5_RANK]; /* Element count of hyperslab */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1,sid2; /* Dataspace ID */
+ hsize_t dims1[] = {SPACE5_DIM1, SPACE5_DIM2, SPACE5_DIM3, SPACE5_DIM4, SPACE5_DIM5};
+ hsize_t dims2[] = {SPACE6_DIM1};
+ hsize_t start[SPACE5_RANK]; /* Starting location of hyperslab */
+ hsize_t count[SPACE5_RANK]; /* Element count of hyperslab */
int *wbuf, /* buffer to write to disk */
*rbuf, /* buffer read from disk */
*tbuf; /* temporary buffer pointer */
int i,j,k,l,m; /* Counters */
- herr_t ret; /* Generic return value */
- hssize_t npoints, /* Number of elements in file selection */
- npoints2; /* Number of elements in memory selection */
+ herr_t ret; /* Generic return value */
+ hssize_t npoints, /* Number of elements in file selection */
+ npoints2; /* Number of elements in memory selection */
unsigned seed; /* Random number seed for each test */
unsigned test_num; /* Count of tests being executed */
@@ -6019,8 +6019,8 @@ test_select_hyper_chunk(hid_t fapl_plist, hid_t xfer_plist)
*/
tmpdata = data;
for (j = 0; j < X; j++)
- for (i = 0; i < Y; i++)
- for (k = 0; k < Z; k++)
+ for (i = 0; i < Y; i++)
+ for (k = 0; k < Z; k++)
*tmpdata++ = (short)((k+1)%256);
/*
@@ -6032,7 +6032,7 @@ test_select_hyper_chunk(hid_t fapl_plist, hid_t xfer_plist)
CHECK(file, FAIL, "H5Fcreate");
/*
- * Describe the size of the array and create the data space for fixed
+ * Describe the size of the array and create the dataspace for fixed
* size dataset.
*/
dimsf[0] = X;
@@ -6182,8 +6182,8 @@ test_select_hyper_chunk(hid_t fapl_plist, hid_t xfer_plist)
tmpdata = data;
tmpdata_out = data_out;
for (j = 0; j < X; j++)
- for (i = 0; i < Y; i++)
- for (k = 0; k < Z; k++,tmpdata++,tmpdata_out++) {
+ for (i = 0; i < Y; i++)
+ for (k = 0; k < Z; k++,tmpdata++,tmpdata_out++) {
if(*tmpdata!=*tmpdata_out)
TestErrPrintf("Line %d: Error! j=%d, i=%d, k=%d, *tmpdata=%x, *tmpdata_out=%x\n",__LINE__,j,i,k,(unsigned)*tmpdata,(unsigned)*tmpdata_out);
} /* end for */
@@ -6230,7 +6230,7 @@ test_select_point_chunk(void)
hid_t dcpl;
herr_t ret; /* Generic return value */
- unsigned *data_out; /* output buffer */
+ unsigned *data_out; /* output buffer */
hsize_t start[SPACE7_RANK]; /* hyperslab offset */
hsize_t count[SPACE7_RANK]; /* size of the hyperslab */
@@ -6251,7 +6251,7 @@ test_select_point_chunk(void)
*/
tmpdata = data;
for (i = 0; i < SPACE7_DIM1; i++)
- for (j = 0; j < SPACE7_DIM1; j++)
+ for (j = 0; j < SPACE7_DIM1; j++)
*tmpdata++ = ((i*SPACE7_DIM2)+j)%256;
/*
@@ -6599,7 +6599,7 @@ test_select_combine(void)
hsize_t dims[SPACE7_RANK]={SPACE7_DIM1,SPACE7_DIM2}; /* Dimensions of dataspace */
H5S_sel_type sel_type; /* Selection type */
hssize_t nblocks; /* Number of hyperslab blocks */
- hsize_t blocks[128][2][SPACE7_RANK]; /* List of blocks */
+ hsize_t blocks[16][2][SPACE7_RANK]; /* List of blocks */
herr_t error;
/* Output message about test being performed */
@@ -7773,7 +7773,7 @@ test_scalar_select2(void)
/* Select all elements in memory & file with "all" selection */
ret = H5Sselect_all(sid);
- CHECK(ret, FAIL, "H5Sselect_none");
+ CHECK(ret, FAIL, "H5Sselect_all");
/* Close disk dataspace */
ret = H5Sclose(sid);
@@ -8115,39 +8115,39 @@ test_shape_same(void)
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "none" selection */
- check = H5S_select_shape_same_test(all_sid,none_sid);
+ check = H5S_select_shape_same_test(all_sid, none_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against single point selection */
- check = H5S_select_shape_same_test(all_sid,single_pt_sid);
+ check = H5S_select_shape_same_test(all_sid, single_pt_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against multiple point selection */
- check = H5S_select_shape_same_test(all_sid,mult_pt_sid);
+ check = H5S_select_shape_same_test(all_sid, mult_pt_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against "plain" single hyperslab selection */
- check = H5S_select_shape_same_test(all_sid,single_hyper_sid);
+ check = H5S_select_shape_same_test(all_sid, single_hyper_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against "all" single hyperslab selection */
- check = H5S_select_shape_same_test(all_sid,single_hyper_all_sid);
+ check = H5S_select_shape_same_test(all_sid, single_hyper_all_sid);
VERIFY(check, TRUE, "H5S_select_shape_same_test");
/* Compare against "single point" single hyperslab selection */
- check = H5S_select_shape_same_test(all_sid,single_hyper_pt_sid);
+ check = H5S_select_shape_same_test(all_sid, single_hyper_pt_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against regular, strided hyperslab selection */
- check = H5S_select_shape_same_test(all_sid,regular_hyper_sid);
+ check = H5S_select_shape_same_test(all_sid, regular_hyper_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against irregular hyperslab selection */
- check = H5S_select_shape_same_test(all_sid,irreg_hyper_sid);
+ check = H5S_select_shape_same_test(all_sid, irreg_hyper_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against "no" hyperslab selection */
- check = H5S_select_shape_same_test(all_sid,none_hyper_sid);
+ check = H5S_select_shape_same_test(all_sid, none_hyper_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against scalar "all" hyperslab selection */
@@ -8160,53 +8160,53 @@ test_shape_same(void)
/* Compare "none" selection to all the selections created */
/* Compare against itself */
- check = H5S_select_shape_same_test(none_sid,none_sid);
+ check = H5S_select_shape_same_test(none_sid, none_sid);
VERIFY(check, TRUE, "H5S_select_shape_same_test");
/* Compare against copy of itself */
tmp_sid = H5Scopy(none_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
- check = H5S_select_shape_same_test(none_sid,tmp_sid);
+ check = H5S_select_shape_same_test(none_sid, tmp_sid);
VERIFY(check, TRUE, "H5S_select_shape_same_test");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
- check = H5S_select_shape_same_test(none_sid,all_sid);
+ check = H5S_select_shape_same_test(none_sid, all_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against single point selection */
- check = H5S_select_shape_same_test(none_sid,single_pt_sid);
+ check = H5S_select_shape_same_test(none_sid, single_pt_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against multiple point selection */
- check = H5S_select_shape_same_test(none_sid,mult_pt_sid);
+ check = H5S_select_shape_same_test(none_sid, mult_pt_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against "plain" single hyperslab selection */
- check = H5S_select_shape_same_test(none_sid,single_hyper_sid);
+ check = H5S_select_shape_same_test(none_sid, single_hyper_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against "all" single hyperslab selection */
- check = H5S_select_shape_same_test(none_sid,single_hyper_all_sid);
+ check = H5S_select_shape_same_test(none_sid, single_hyper_all_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against "single point" single hyperslab selection */
- check = H5S_select_shape_same_test(none_sid,single_hyper_pt_sid);
+ check = H5S_select_shape_same_test(none_sid, single_hyper_pt_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against regular, strided hyperslab selection */
- check = H5S_select_shape_same_test(none_sid,regular_hyper_sid);
+ check = H5S_select_shape_same_test(none_sid, regular_hyper_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against irregular hyperslab selection */
- check = H5S_select_shape_same_test(none_sid,irreg_hyper_sid);
+ check = H5S_select_shape_same_test(none_sid, irreg_hyper_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against "no" hyperslab selection */
- check = H5S_select_shape_same_test(none_sid,none_hyper_sid);
+ check = H5S_select_shape_same_test(none_sid, none_hyper_sid);
VERIFY(check, TRUE, "H5S_select_shape_same_test");
/* Compare against scalar "all" hyperslab selection */
@@ -8219,53 +8219,53 @@ test_shape_same(void)
/* Compare single point selection to all the selections created */
/* Compare against itself */
- check = H5S_select_shape_same_test(single_pt_sid,single_pt_sid);
+ check = H5S_select_shape_same_test(single_pt_sid, single_pt_sid);
VERIFY(check, TRUE, "H5S_select_shape_same_test");
/* Compare against copy of itself */
tmp_sid = H5Scopy(single_pt_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
- check = H5S_select_shape_same_test(single_pt_sid,tmp_sid);
+ check = H5S_select_shape_same_test(single_pt_sid, tmp_sid);
VERIFY(check, TRUE, "H5S_select_shape_same_test");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
- check = H5S_select_shape_same_test(single_pt_sid,all_sid);
+ check = H5S_select_shape_same_test(single_pt_sid, all_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against "none" selection */
- check = H5S_select_shape_same_test(single_pt_sid,none_sid);
+ check = H5S_select_shape_same_test(single_pt_sid, none_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against multiple point selection */
- check = H5S_select_shape_same_test(single_pt_sid,mult_pt_sid);
+ check = H5S_select_shape_same_test(single_pt_sid, mult_pt_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against "plain" single hyperslab selection */
- check = H5S_select_shape_same_test(single_pt_sid,single_hyper_sid);
+ check = H5S_select_shape_same_test(single_pt_sid, single_hyper_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against "all" single hyperslab selection */
- check = H5S_select_shape_same_test(single_pt_sid,single_hyper_all_sid);
+ check = H5S_select_shape_same_test(single_pt_sid, single_hyper_all_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against "single point" single hyperslab selection */
- check = H5S_select_shape_same_test(single_pt_sid,single_hyper_pt_sid);
+ check = H5S_select_shape_same_test(single_pt_sid, single_hyper_pt_sid);
VERIFY(check, TRUE, "H5S_select_shape_same_test");
/* Compare against regular, strided hyperslab selection */
- check = H5S_select_shape_same_test(single_pt_sid,regular_hyper_sid);
+ check = H5S_select_shape_same_test(single_pt_sid, regular_hyper_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against irregular hyperslab selection */
- check = H5S_select_shape_same_test(single_pt_sid,irreg_hyper_sid);
+ check = H5S_select_shape_same_test(single_pt_sid, irreg_hyper_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against "no" hyperslab selection */
- check=H5S_select_shape_same_test(single_pt_sid,none_hyper_sid);
+ check=H5S_select_shape_same_test(single_pt_sid, none_hyper_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against scalar "all" hyperslab selection */
@@ -8278,53 +8278,53 @@ test_shape_same(void)
/* Compare multiple point selection to all the selections created */
/* Compare against itself */
- check = H5S_select_shape_same_test(mult_pt_sid,mult_pt_sid);
+ check = H5S_select_shape_same_test(mult_pt_sid, mult_pt_sid);
VERIFY(check, TRUE, "H5S_select_shape_same_test");
/* Compare against copy of itself */
tmp_sid = H5Scopy(mult_pt_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
- check = H5S_select_shape_same_test(mult_pt_sid,tmp_sid);
+ check = H5S_select_shape_same_test(mult_pt_sid, tmp_sid);
VERIFY(check, TRUE, "H5S_select_shape_same_test");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
- check = H5S_select_shape_same_test(mult_pt_sid,all_sid);
+ check = H5S_select_shape_same_test(mult_pt_sid, all_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against "none" selection */
- check = H5S_select_shape_same_test(mult_pt_sid,none_sid);
+ check = H5S_select_shape_same_test(mult_pt_sid, none_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against single point selection */
- check = H5S_select_shape_same_test(mult_pt_sid,single_pt_sid);
+ check = H5S_select_shape_same_test(mult_pt_sid, single_pt_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against "plain" single hyperslab selection */
- check = H5S_select_shape_same_test(mult_pt_sid,single_hyper_sid);
+ check = H5S_select_shape_same_test(mult_pt_sid, single_hyper_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against "all" single hyperslab selection */
- check = H5S_select_shape_same_test(mult_pt_sid,single_hyper_all_sid);
+ check = H5S_select_shape_same_test(mult_pt_sid, single_hyper_all_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against "single point" single hyperslab selection */
- check = H5S_select_shape_same_test(mult_pt_sid,single_hyper_pt_sid);
+ check = H5S_select_shape_same_test(mult_pt_sid, single_hyper_pt_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against regular, strided hyperslab selection */
- check = H5S_select_shape_same_test(mult_pt_sid,regular_hyper_sid);
+ check = H5S_select_shape_same_test(mult_pt_sid, regular_hyper_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against irregular hyperslab selection */
- check = H5S_select_shape_same_test(mult_pt_sid,irreg_hyper_sid);
+ check = H5S_select_shape_same_test(mult_pt_sid, irreg_hyper_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against "no" hyperslab selection */
- check = H5S_select_shape_same_test(mult_pt_sid,none_hyper_sid);
+ check = H5S_select_shape_same_test(mult_pt_sid, none_hyper_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against scalar "all" hyperslab selection */
@@ -8337,53 +8337,53 @@ test_shape_same(void)
/* Compare single "normal" hyperslab selection to all the selections created */
/* Compare against itself */
- check = H5S_select_shape_same_test(single_hyper_sid,single_hyper_sid);
+ check = H5S_select_shape_same_test(single_hyper_sid, single_hyper_sid);
VERIFY(check, TRUE, "H5S_select_shape_same_test");
/* Compare against copy of itself */
tmp_sid = H5Scopy(single_hyper_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
- check = H5S_select_shape_same_test(single_hyper_sid,tmp_sid);
+ check = H5S_select_shape_same_test(single_hyper_sid, tmp_sid);
VERIFY(check, TRUE, "H5S_select_shape_same_test");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
- check = H5S_select_shape_same_test(single_hyper_sid,all_sid);
+ check = H5S_select_shape_same_test(single_hyper_sid, all_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against "none" selection */
- check = H5S_select_shape_same_test(single_hyper_sid,none_sid);
+ check = H5S_select_shape_same_test(single_hyper_sid, none_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against single point selection */
- check = H5S_select_shape_same_test(single_hyper_sid,single_pt_sid);
+ check = H5S_select_shape_same_test(single_hyper_sid, single_pt_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against multiple point selection */
- check = H5S_select_shape_same_test(single_hyper_sid,mult_pt_sid);
+ check = H5S_select_shape_same_test(single_hyper_sid, mult_pt_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against "all" single hyperslab selection */
- check = H5S_select_shape_same_test(single_hyper_sid,single_hyper_all_sid);
+ check = H5S_select_shape_same_test(single_hyper_sid, single_hyper_all_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against "single point" single hyperslab selection */
- check = H5S_select_shape_same_test(single_hyper_sid,single_hyper_pt_sid);
+ check = H5S_select_shape_same_test(single_hyper_sid, single_hyper_pt_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against regular, strided hyperslab selection */
- check = H5S_select_shape_same_test(single_hyper_sid,regular_hyper_sid);
+ check = H5S_select_shape_same_test(single_hyper_sid, regular_hyper_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against irregular hyperslab selection */
- check=H5S_select_shape_same_test(single_hyper_sid,irreg_hyper_sid);
+ check=H5S_select_shape_same_test(single_hyper_sid, irreg_hyper_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against "no" hyperslab selection */
- check = H5S_select_shape_same_test(single_hyper_sid,none_hyper_sid);
+ check = H5S_select_shape_same_test(single_hyper_sid, none_hyper_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
#ifdef NOT_YET
@@ -8410,7 +8410,7 @@ test_shape_same(void)
} /* end for */
/* Compare against hyperslab selection */
- check = H5S_select_shape_same_test(single_hyper_sid,tmp_sid);
+ check = H5S_select_shape_same_test(single_hyper_sid, tmp_sid);
VERIFY(check, TRUE, "H5S_select_shape_same_test");
ret = H5Sclose(tmp_sid);
@@ -8437,7 +8437,7 @@ test_shape_same(void)
} /* end for */
/* Compare against hyperslab selection */
- check = H5S_select_shape_same_test(single_hyper_sid,tmp_sid);
+ check = H5S_select_shape_same_test(single_hyper_sid, tmp_sid);
VERIFY(check, TRUE, "H5S_select_shape_same_test");
ret = H5Sclose(tmp_sid);
@@ -8453,53 +8453,53 @@ test_shape_same(void)
/* Compare single "all" hyperslab selection to all the selections created */
/* Compare against itself */
- check = H5S_select_shape_same_test(single_hyper_all_sid,single_hyper_all_sid);
+ check = H5S_select_shape_same_test(single_hyper_all_sid, single_hyper_all_sid);
VERIFY(check, TRUE, "H5S_select_shape_same_test");
/* Compare against copy of itself */
tmp_sid = H5Scopy(single_hyper_all_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
- check = H5S_select_shape_same_test(single_hyper_all_sid,tmp_sid);
+ check = H5S_select_shape_same_test(single_hyper_all_sid, tmp_sid);
VERIFY(check, TRUE, "H5S_select_shape_same_test");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
- check = H5S_select_shape_same_test(single_hyper_all_sid,all_sid);
+ check = H5S_select_shape_same_test(single_hyper_all_sid, all_sid);
VERIFY(check, TRUE, "H5S_select_shape_same_test");
/* Compare against "none" selection */
- check = H5S_select_shape_same_test(single_hyper_all_sid,none_sid);
+ check = H5S_select_shape_same_test(single_hyper_all_sid, none_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against single point selection */
- check = H5S_select_shape_same_test(single_hyper_all_sid,single_pt_sid);
+ check = H5S_select_shape_same_test(single_hyper_all_sid, single_pt_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against multiple point selection */
- check = H5S_select_shape_same_test(single_hyper_all_sid,mult_pt_sid);
+ check = H5S_select_shape_same_test(single_hyper_all_sid, mult_pt_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against "plain" single hyperslab selection */
- check = H5S_select_shape_same_test(single_hyper_all_sid,single_hyper_sid);
+ check = H5S_select_shape_same_test(single_hyper_all_sid, single_hyper_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against "single point" single hyperslab selection */
- check = H5S_select_shape_same_test(single_hyper_all_sid,single_hyper_pt_sid);
+ check = H5S_select_shape_same_test(single_hyper_all_sid, single_hyper_pt_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against regular, strided hyperslab selection */
- check = H5S_select_shape_same_test(single_hyper_all_sid,regular_hyper_sid);
+ check = H5S_select_shape_same_test(single_hyper_all_sid, regular_hyper_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against irregular hyperslab selection */
- check = H5S_select_shape_same_test(single_hyper_all_sid,irreg_hyper_sid);
+ check = H5S_select_shape_same_test(single_hyper_all_sid, irreg_hyper_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against "no" hyperslab selection */
- check = H5S_select_shape_same_test(single_hyper_all_sid,none_hyper_sid);
+ check = H5S_select_shape_same_test(single_hyper_all_sid, none_hyper_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
#ifdef NOT_YET
@@ -8525,7 +8525,7 @@ test_shape_same(void)
} /* end for */
/* Compare against hyperslab selection */
- check = H5S_select_shape_same_test(single_hyper_all_sid,tmp_sid);
+ check = H5S_select_shape_same_test(single_hyper_all_sid, tmp_sid);
VERIFY(check, TRUE, "H5S_select_shape_same_test");
ret = H5Sclose(tmp_sid);
@@ -8552,7 +8552,7 @@ test_shape_same(void)
} /* end for */
/* Compare against hyperslab selection */
- check = H5S_select_shape_same_test(single_hyper_all_sid,tmp_sid);
+ check = H5S_select_shape_same_test(single_hyper_all_sid, tmp_sid);
VERIFY(check, TRUE, "H5S_select_shape_same_test");
ret = H5Sclose(tmp_sid);
@@ -8568,53 +8568,53 @@ test_shape_same(void)
/* Compare single "point" hyperslab selection to all the selections created */
/* Compare against itself */
- check = H5S_select_shape_same_test(single_hyper_pt_sid,single_hyper_pt_sid);
+ check = H5S_select_shape_same_test(single_hyper_pt_sid, single_hyper_pt_sid);
VERIFY(check, TRUE, "H5S_select_shape_same_test");
/* Compare against copy of itself */
tmp_sid = H5Scopy(single_hyper_pt_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
- check = H5S_select_shape_same_test(single_hyper_pt_sid,tmp_sid);
+ check = H5S_select_shape_same_test(single_hyper_pt_sid, tmp_sid);
VERIFY(check, TRUE, "H5S_select_shape_same_test");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
- check = H5S_select_shape_same_test(single_hyper_pt_sid,all_sid);
+ check = H5S_select_shape_same_test(single_hyper_pt_sid, all_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against "none" selection */
- check = H5S_select_shape_same_test(single_hyper_pt_sid,none_sid);
+ check = H5S_select_shape_same_test(single_hyper_pt_sid, none_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against single point selection */
- check = H5S_select_shape_same_test(single_hyper_pt_sid,single_pt_sid);
+ check = H5S_select_shape_same_test(single_hyper_pt_sid, single_pt_sid);
VERIFY(check, TRUE, "H5S_select_shape_same_test");
/* Compare against multiple point selection */
- check = H5S_select_shape_same_test(single_hyper_pt_sid,mult_pt_sid);
+ check = H5S_select_shape_same_test(single_hyper_pt_sid, mult_pt_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against "plain" single hyperslab selection */
- check = H5S_select_shape_same_test(single_hyper_pt_sid,single_hyper_sid);
+ check = H5S_select_shape_same_test(single_hyper_pt_sid, single_hyper_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against "all" single hyperslab selection */
- check = H5S_select_shape_same_test(single_hyper_pt_sid,single_hyper_all_sid);
+ check = H5S_select_shape_same_test(single_hyper_pt_sid, single_hyper_all_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against regular, strided hyperslab selection */
- check = H5S_select_shape_same_test(single_hyper_pt_sid,regular_hyper_sid);
+ check = H5S_select_shape_same_test(single_hyper_pt_sid, regular_hyper_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against irregular hyperslab selection */
- check = H5S_select_shape_same_test(single_hyper_pt_sid,irreg_hyper_sid);
+ check = H5S_select_shape_same_test(single_hyper_pt_sid, irreg_hyper_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against "no" hyperslab selection */
- check = H5S_select_shape_same_test(single_hyper_pt_sid,none_hyper_sid);
+ check = H5S_select_shape_same_test(single_hyper_pt_sid, none_hyper_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against scalar "all" hyperslab selection */
@@ -8627,53 +8627,53 @@ test_shape_same(void)
/* Compare regular, strided hyperslab selection to all the selections created */
/* Compare against itself */
- check = H5S_select_shape_same_test(regular_hyper_sid,regular_hyper_sid);
+ check = H5S_select_shape_same_test(regular_hyper_sid, regular_hyper_sid);
VERIFY(check, TRUE, "H5S_select_shape_same_test");
/* Compare against copy of itself */
tmp_sid = H5Scopy(regular_hyper_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
- check = H5S_select_shape_same_test(regular_hyper_sid,tmp_sid);
+ check = H5S_select_shape_same_test(regular_hyper_sid, tmp_sid);
VERIFY(check, TRUE, "H5S_select_shape_same_test");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
- check = H5S_select_shape_same_test(regular_hyper_sid,all_sid);
+ check = H5S_select_shape_same_test(regular_hyper_sid, all_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against "none" selection */
- check = H5S_select_shape_same_test(regular_hyper_sid,none_sid);
+ check = H5S_select_shape_same_test(regular_hyper_sid, none_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against single point selection */
- check = H5S_select_shape_same_test(regular_hyper_sid,single_pt_sid);
+ check = H5S_select_shape_same_test(regular_hyper_sid, single_pt_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against multiple point selection */
- check = H5S_select_shape_same_test(regular_hyper_sid,mult_pt_sid);
+ check = H5S_select_shape_same_test(regular_hyper_sid, mult_pt_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against "plain" single hyperslab selection */
- check = H5S_select_shape_same_test(regular_hyper_sid,single_hyper_sid);
+ check = H5S_select_shape_same_test(regular_hyper_sid, single_hyper_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against "all" single hyperslab selection */
- check = H5S_select_shape_same_test(regular_hyper_sid,single_hyper_all_sid);
+ check = H5S_select_shape_same_test(regular_hyper_sid, single_hyper_all_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against "single point" single hyperslab selection */
- check = H5S_select_shape_same_test(regular_hyper_sid,single_hyper_pt_sid);
+ check = H5S_select_shape_same_test(regular_hyper_sid, single_hyper_pt_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against irregular hyperslab selection */
- check = H5S_select_shape_same_test(regular_hyper_sid,irreg_hyper_sid);
+ check = H5S_select_shape_same_test(regular_hyper_sid, irreg_hyper_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against "no" hyperslab selection */
- check = H5S_select_shape_same_test(regular_hyper_sid,none_hyper_sid);
+ check = H5S_select_shape_same_test(regular_hyper_sid, none_hyper_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Construct point selection which matches regular, strided hyperslab selection */
@@ -8692,7 +8692,7 @@ test_shape_same(void)
} /* end for */
/* Compare against hyperslab selection */
- check = H5S_select_shape_same_test(regular_hyper_sid,tmp_sid);
+ check = H5S_select_shape_same_test(regular_hyper_sid, tmp_sid);
VERIFY(check, TRUE, "H5S_select_shape_same_test");
ret = H5Sclose(tmp_sid);
@@ -8718,7 +8718,7 @@ test_shape_same(void)
} /* end for */
/* Compare against hyperslab selection */
- check = H5S_select_shape_same_test(regular_hyper_sid,tmp_sid);
+ check = H5S_select_shape_same_test(regular_hyper_sid, tmp_sid);
VERIFY(check, TRUE, "H5S_select_shape_same_test");
ret = H5Sclose(tmp_sid);
@@ -8738,7 +8738,7 @@ test_shape_same(void)
CHECK(ret, FAIL, "H5Sselect_hyperslab");
/* Compare against hyperslab selection */
- check = H5S_select_shape_same_test(regular_hyper_sid,tmp_sid);
+ check = H5S_select_shape_same_test(regular_hyper_sid, tmp_sid);
VERIFY(check, TRUE, "H5S_select_shape_same_test");
ret = H5Sclose(tmp_sid);
@@ -8754,53 +8754,53 @@ test_shape_same(void)
/* Compare irregular hyperslab selection to all the selections created */
/* Compare against itself */
- check = H5S_select_shape_same_test(irreg_hyper_sid,irreg_hyper_sid);
+ check = H5S_select_shape_same_test(irreg_hyper_sid, irreg_hyper_sid);
VERIFY(check, TRUE, "H5S_select_shape_same_test");
/* Compare against copy of itself */
tmp_sid = H5Scopy(irreg_hyper_sid);
CHECK(tmp_sid, FAIL, "H5Scopy");
- check = H5S_select_shape_same_test(irreg_hyper_sid,tmp_sid);
+ check = H5S_select_shape_same_test(irreg_hyper_sid, tmp_sid);
VERIFY(check, TRUE, "H5S_select_shape_same_test");
ret = H5Sclose(tmp_sid);
CHECK(ret, FAIL, "H5Sclose");
/* Compare against "all" selection */
- check = H5S_select_shape_same_test(irreg_hyper_sid,all_sid);
+ check = H5S_select_shape_same_test(irreg_hyper_sid, all_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against "none" selection */
- check = H5S_select_shape_same_test(irreg_hyper_sid,none_sid);
+ check = H5S_select_shape_same_test(irreg_hyper_sid, none_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against single point selection */
- check = H5S_select_shape_same_test(irreg_hyper_sid,single_pt_sid);
+ check = H5S_select_shape_same_test(irreg_hyper_sid, single_pt_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against multiple point selection */
- check = H5S_select_shape_same_test(irreg_hyper_sid,mult_pt_sid);
+ check = H5S_select_shape_same_test(irreg_hyper_sid, mult_pt_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against "plain" single hyperslab selection */
- check = H5S_select_shape_same_test(irreg_hyper_sid,single_hyper_sid);
+ check = H5S_select_shape_same_test(irreg_hyper_sid, single_hyper_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against "all" single hyperslab selection */
- check = H5S_select_shape_same_test(irreg_hyper_sid,single_hyper_all_sid);
+ check = H5S_select_shape_same_test(irreg_hyper_sid, single_hyper_all_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against "single point" single hyperslab selection */
- check = H5S_select_shape_same_test(irreg_hyper_sid,single_hyper_pt_sid);
+ check = H5S_select_shape_same_test(irreg_hyper_sid, single_hyper_pt_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against regular, strided hyperslab selection */
- check = H5S_select_shape_same_test(irreg_hyper_sid,regular_hyper_sid);
+ check = H5S_select_shape_same_test(irreg_hyper_sid, regular_hyper_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Compare against "no" hyperslab selection */
- check = H5S_select_shape_same_test(irreg_hyper_sid,none_hyper_sid);
+ check = H5S_select_shape_same_test(irreg_hyper_sid, none_hyper_sid);
VERIFY(check, FALSE, "H5S_select_shape_same_test");
/* Construct hyperslab selection which matches irregular hyperslab selection */
@@ -8826,7 +8826,7 @@ test_shape_same(void)
} /* end for */
/* Compare against hyperslab selection */
- check = H5S_select_shape_same_test(irreg_hyper_sid,tmp_sid);
+ check = H5S_select_shape_same_test(irreg_hyper_sid, tmp_sid);
VERIFY(check, TRUE, "H5S_select_shape_same_test");
ret = H5Sclose(tmp_sid);
@@ -9003,7 +9003,7 @@ test_shape_same(void)
** xz plane, and three parallel to the yz plane.
**
** Assuming that z is the fastest changing dimension,
-** H5Sselect_shape_same() should return TRUE when comparing
+** H5S_select_shape_same() should return TRUE when comparing
** the full 2-D space against any hyperslab parallel to the
** yz plane in the 3-D space, and FALSE when comparing the
** full 2-D space against the other two hyperslabs.
@@ -9012,7 +9012,7 @@ test_shape_same(void)
** and select a (10 X 10 X 2) hyperslab parallel to the yz
** axis in one of them, and two parallel (10 X 10 X 1) hyper
** slabs parallel to the yz axis in the other.
-** H5Sselect_shape_same() should return FALSE when comparing
+** H5S_select_shape_same() should return FALSE when comparing
** each to the 2-D selection.
**
****************************************************************/
@@ -9309,7 +9309,7 @@ test_shape_same_dr__smoke_check_1(void)
** to the yz plane.
**
** Assuming that z is the fastest changing dimension,
-** H5Sselect_shape_same() should return TRUE when comparing
+** H5S_select_shape_same() should return TRUE when comparing
** the 2-D space checker board selection against a checker
** board hyperslab parallel to the yz plane in the 3-D
** space, and FALSE when comparing the 2-D checkerboard
@@ -9319,7 +9319,7 @@ test_shape_same_dr__smoke_check_1(void)
** Also create an additional 3-D dataspaces (10 X 10 X 10),
** and select a checker board parallel with the yz axis,
** save with some squares being on different planes.
-** H5Sselect_shape_same() should return FALSE when
+** H5S_select_shape_same() should return FALSE when
** comparing this selection to the 2-D selection.
**
****************************************************************/
@@ -9540,9 +9540,9 @@ test_shape_same_dr__smoke_check_2(void)
start[1] = 0; /* y */
start[2] = 0; /* z */
- stride[0] = 20; /* x -- large enough that there will only be one slice */
- stride[1] = 4; /* y */
- stride[2] = 4; /* z */
+ stride[0] = 20; /* x -- large enough that there will only be one slice */
+ stride[1] = 4; /* y */
+ stride[2] = 4; /* z */
count[0] = 1; /* x */
count[1] = 3; /* y */
@@ -9720,7 +9720,7 @@ test_shape_same_dr__smoke_check_2(void)
** cases.
**
** Assuming that z is the fastest changing dimension,
-** H5Sselect_shape_same() should return TRUE when
+** H5S_select_shape_same() should return TRUE when
** comparing the 2-D irregular hyperslab selection
** against the irregular hyperslab selections parallel
** to the yz plane in the 3-D space, and FALSE when
@@ -10230,7 +10230,7 @@ test_shape_same_dr__smoke_check_3(void)
** And select these entire spaces as well.
**
** Compare the 2-D space against all the other spaces
-** with H5Sselect_shape_same(). The (1 X 10 X 10) &
+** with H5S_select_shape_same(). The (1 X 10 X 10) &
** (1 X 1 X 10 X 10) should return TRUE. All others
** should return FALSE.
**
@@ -10421,17 +10421,16 @@ test_shape_same_dr__smoke_check_4(void)
ret = H5Sclose(four_d_space_6_sid);
CHECK(ret, FAIL, "H5Sclose");
-
} /* test_shape_same_dr__smoke_check_4() */
/****************************************************************
**
** test_shape_same_dr__full_space_vs_slice(): Tests selection
** of a full n-cube dataspace vs an n-dimensional slice of
-** of an m-cube (m > n) in a call to H5Sselect_shape_same().
+** of an m-cube (m > n) in a call to H5S_select_shape_same().
** Note that this test does not require the n-cube and the
** n-dimensional slice to have the same rank (although
-** H5Sselect_shape_same() should always return FALSE if
+** H5S_select_shape_same() should always return FALSE if
** they don't).
**
** Per Quincey's suggestion, only test up to 5 dimensional
@@ -10563,7 +10562,7 @@ test_shape_same_dr__full_space_vs_slice(int test_num,
** Run the test_shape_same_dr__full_space_vs_slice() test
** over a variety of ranks and offsets.
**
-** At present, we test H5Sselect_shape_same() with
+** At present, we test H5S_select_shape_same() with
** fully selected 1, 2, 3, and 4 cubes as one parameter, and
** 1, 2, 3, and 4 dimensional slices through a n-cube of rank
** no more than 5 (and at least the rank of the slice).
@@ -10571,7 +10570,7 @@ test_shape_same_dr__full_space_vs_slice(int test_num,
** sufficient.
**
** All the n-cubes will have lengths of the same size, so
-** H5Sselect_shape_same() should return true iff:
+** H5S_select_shape_same() should return true iff:
**
** 1) the rank for the fully selected n cube equals the
** number of dimensions selected in the slice through the
@@ -10707,14 +10706,14 @@ test_shape_same_dr__run_full_space_vs_slice_tests(void)
/****************************************************************
**
** test_shape_same_dr__checkerboard(): Tests selection of a
-** "checker board" subset of a full n-cube data space vs
-** a "checker board" n-dimensional slice of an m-cube (m > n).
-** in a call to H5S_select_shape_same().
+** "checker board" subset of a full n-cube dataspace vs
+** a "checker board" n-dimensional slice of an m-cube (m > n).
+** in a call to H5S_select_shape_same().
**
-** Note that this test does not require the n-cube and the
-** n-dimensional slice to have the same rank (although
-** H5S_select_shape_same() should always return FALSE if
-** they don't).
+** Note that this test does not require the n-cube and the
+** n-dimensional slice to have the same rank (although
+** H5S_select_shape_same() should always return FALSE if
+** they don't).
**
** Per Quincey's suggestion, only test up to 5 dimensional
** spaces.
@@ -10837,9 +10836,9 @@ test_shape_same_dr__checkerboard(int test_num,
* - - - * * * - - - *
* - - - * * * - - - *
* - - - * * * - - - *
- * * * * - - - * * * -
- * * * * - - - * * * -
- * * * * - - - * * * -
+ * * * * - - - * * * -
+ * * * * - - - * * * -
+ * * * * - - - * * * -
* - - - * * * - - - *
*
* As the above pattern can't be selected in one
@@ -11043,7 +11042,6 @@ test_shape_same_dr__checkerboard(int test_num,
ret = H5Sclose(n_cube_1_sid);
CHECK(ret, FAIL, "H5Sclose");
-
} /* test_shape_same_dr__checkerboard() */
@@ -11051,7 +11049,7 @@ test_shape_same_dr__checkerboard(int test_num,
**
** test_shape_same_dr__run_checkerboard_tests():
**
-** In this set of tests, we test H5S_select_shape_same()
+** In this set of tests, we test H5S_select_shape_same()
** with a "checkerboard" selection of 1, 2, 3, and 4 cubes as
** one parameter, and 1, 2, 3, and 4 dimensional checkerboard
** slices through a n-cube of rank no more than 5 (and at
@@ -11321,15 +11319,15 @@ test_shape_same_dr__run_checkerboard_tests(void)
**
** test_shape_same_dr__irregular():
**
-** Tests selection of an "irregular" subset of a full
-** n-cube data space vs an identical "irregular" subset
-** of an n-dimensional slice of an m-cube (m > n).
-** in a call to H5S_select_shape_same().
+** Tests selection of an "irregular" subset of a full
+** n-cube dataspace vs an identical "irregular" subset
+** of an n-dimensional slice of an m-cube (m > n).
+** in a call to H5S_select_shape_same().
**
-** Note that this test does not require the n-cube and the
-** n-dimensional slice to have the same rank (although
-** H5S_select_shape_same() should always return FALSE if
-** they don't).
+** Note that this test does not require the n-cube and the
+** n-dimensional slice to have the same rank (although
+** H5S_select_shape_same() should always return FALSE if
+** they don't).
**
****************************************************************/
static void
@@ -11595,7 +11593,7 @@ test_shape_same_dr__irregular(int test_num,
**
** test_shape_same_dr__run_irregular_tests():
**
-** In this set of tests, we test H5Sselect_shape_same()
+** In this set of tests, we test H5S_select_shape_same()
** with an "irregular" subselection of 1, 2, 3, and 4 cubes as
** one parameter, and irregular subselections of 1, 2, 3,
** and 4 dimensional slices through a n-cube of rank no more
@@ -11923,7 +11921,7 @@ test_space_rebuild(void)
rebuild_stat = FALSE;
rebuild_stat = H5S_get_rebuild_status_test(sid_reg1);
- assert(rebuild_stat!=FAIL);
+ HDassert(rebuild_stat!=FAIL);
/* In this case, rebuild_stat should be TRUE. */
if(!rebuild_stat){
ret = FAIL;
@@ -11955,12 +11953,13 @@ test_space_rebuild(void)
rebuild_stat = TRUE;
rebuild_stat = H5S_get_rebuild_status_test(sid_irreg1);
- assert(rebuild_stat!=FAIL);
+ HDassert(rebuild_stat != FAIL);
/* In this case, rebuild_stat should be FALSE. */
if(rebuild_stat){
ret = FAIL;
CHECK(ret,FAIL,"H5S_hyper_rebuild");
- }/* No need to do shape comparision */
+ }
+ /* No need to do shape comparision */
MESSAGE(7, ("Testing functionality to rebuild 2-D hyperslab selection\n"));
@@ -12002,7 +12001,7 @@ test_space_rebuild(void)
rebuild_stat = FALSE;
rebuild_stat = H5S_get_rebuild_status_test(sid_reg2);
- assert(rebuild_stat!=FAIL);
+ HDassert(rebuild_stat != FAIL);
/* In this case, rebuild_stat should be TRUE. */
if(!rebuild_stat){
ret = FAIL;
@@ -12011,7 +12010,7 @@ test_space_rebuild(void)
else {
/* In this case, rebuild_check should be TRUE. */
rebuild_check = H5S_select_shape_same_test(sid_reg2,sid_reg_ori2);
- CHECK(rebuild_check,FALSE,"H5S_hyper_rebuild");
+ CHECK(rebuild_check, FALSE, "H5S_hyper_rebuild");
}
/* 2-D irregular case */
@@ -12039,12 +12038,13 @@ test_space_rebuild(void)
rebuild_stat = TRUE;
rebuild_stat = H5S_get_rebuild_status_test(sid_irreg2);
- assert(rebuild_stat!=FAIL);
+ HDassert(rebuild_stat != FAIL);
/* In this case, rebuild_stat should be FALSE. */
if(rebuild_stat){
ret = FAIL;
CHECK(ret,FAIL,"H5S_hyper_rebuild");
- }/* No need to do shape comparision */
+ }
+ /* No need to do shape comparision */
MESSAGE(7, ("Testing functionality to rebuild 3-D hyperslab selection\n"));
@@ -12091,7 +12091,7 @@ test_space_rebuild(void)
rebuild_stat = FALSE;
rebuild_stat = H5S_get_rebuild_status_test(sid_reg3);
- assert(rebuild_stat!=FAIL);
+ assert(rebuild_stat != FAIL);
/* In this case, rebuild_stat should be TRUE. */
if(!rebuild_stat){
@@ -12134,12 +12134,13 @@ test_space_rebuild(void)
rebuild_stat = TRUE;
rebuild_stat = H5S_get_rebuild_status_test(sid_irreg3);
- assert(rebuild_stat!=FAIL);
+ assert(rebuild_stat != FAIL);
/* In this case, rebuild_stat should be FALSE. */
if(rebuild_stat){
ret = FAIL;
CHECK(ret,FAIL,"H5S_hyper_rebuild");
- }/* No need to do shape comparision */
+ }
+ /* No need to do shape comparision */
MESSAGE(7, ("Testing functionality to rebuild 4-D hyperslab selection\n"));
@@ -12194,7 +12195,7 @@ test_space_rebuild(void)
rebuild_stat = FALSE;
rebuild_stat = H5S_get_rebuild_status_test(sid_reg4);
- assert(rebuild_stat!=FAIL);
+ assert(rebuild_stat != FAIL);
/* In this case, rebuild_stat should be TRUE. */
if(!rebuild_stat){
ret = FAIL;
@@ -12247,12 +12248,13 @@ test_space_rebuild(void)
rebuild_stat = TRUE;
rebuild_stat = H5S_get_rebuild_status_test(sid_irreg4);
- assert(rebuild_stat!=FAIL);
+ assert(rebuild_stat != FAIL);
/* In this case, rebuild_stat should be FALSE. */
if(rebuild_stat){
ret = FAIL;
CHECK(ret,FAIL,"H5S_hyper_rebuild");
- }/* No need to do shape comparision */
+ }
+ /* No need to do shape comparision */
MESSAGE(7, ("Testing functionality to rebuild 5-D hyperslab selection\n"));
@@ -12311,7 +12313,7 @@ test_space_rebuild(void)
rebuild_stat = FALSE;
rebuild_stat = H5S_get_rebuild_status_test(sid_reg5);
- assert(rebuild_stat!=FAIL);
+ assert(rebuild_stat != FAIL);
/* In this case, rebuild_stat should be TRUE. */
if(!rebuild_stat){
ret = FAIL;
@@ -12369,12 +12371,13 @@ test_space_rebuild(void)
rebuild_stat = TRUE;
rebuild_stat = H5S_get_rebuild_status_test(sid_irreg5);
- assert(rebuild_stat!=FAIL);
+ assert(rebuild_stat != FAIL);
/* In this case, rebuild_stat should be FALSE. */
if(rebuild_stat){
ret = FAIL;
CHECK(ret,FAIL,"H5S_hyper_rebuild");
- }/* No need to do shape comparision */
+ }
+ /* No need to do shape comparision */
/* We use 5-D to test a special case with
rebuilding routine TRUE, FALSE and TRUE */
@@ -12414,7 +12417,8 @@ test_space_rebuild(void)
if(!rebuild_stat){
ret = FAIL;
CHECK(ret,FAIL,"H5S_hyper_rebuild");
- }/* No need to do shape comparision */
+ }
+ /* No need to do shape comparision */
/* Adding some selections to make it real irregular */
start5[3] = 1;
@@ -12432,12 +12436,13 @@ test_space_rebuild(void)
rebuild_stat = TRUE;
rebuild_stat = H5S_get_rebuild_status_test(sid_spec);
- assert(rebuild_stat!=FAIL);
+ HDassert(rebuild_stat != FAIL);
/* In this case, rebuild_stat should be FALSE. */
if(rebuild_stat){
ret = FAIL;
CHECK(ret,FAIL,"H5S_hyper_rebuild");
- }/* No need to do shape comparision */
+ }
+ /* No need to do shape comparision */
/* Add more selections to make it regular again */
start5[3] = 5;
@@ -12455,12 +12460,13 @@ test_space_rebuild(void)
rebuild_stat = FALSE;
rebuild_stat = H5S_get_rebuild_status_test(sid_spec);
- assert(rebuild_stat!=FAIL);
+ HDassert(rebuild_stat!=FAIL);
/* In this case, rebuild_stat should be FALSE. */
if(!rebuild_stat){
ret = FAIL;
CHECK(ret,FAIL,"H5S_hyper_rebuild");
- }/* No need to do shape comparision */
+ }
+ /* No need to do shape comparision */
H5Sclose(sid_reg1);
CHECK(ret, FAIL, "H5Sclose");