summaryrefslogtreecommitdiffstats
path: root/test/ntypes.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/ntypes.c')
-rw-r--r--test/ntypes.c106
1 files changed, 53 insertions, 53 deletions
diff --git a/test/ntypes.c b/test/ntypes.c
index e79f974..318fe2f 100644
--- a/test/ntypes.c
+++ b/test/ntypes.c
@@ -136,7 +136,7 @@ test_atomic_dtype(hid_t file)
/* Read the dataset back. The temporary buffer is for special platforms
* like Cray. */
if (NULL == (tmp = HDmalloc((size_t)(DIM0 * DIM1 * H5Tget_size(native_type)))))
- TEST_ERROR
+ TEST_ERROR;
if (H5Dread(dataset, native_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, tmp) < 0)
TEST_ERROR;
@@ -553,7 +553,7 @@ test_compound_dtype2(hid_t file)
/* Read the dataset back. Temporary buffer is for special platforms like
* Cray */
if (NULL == (tmp = HDmalloc(DIM0 * DIM1 * H5Tget_size(native_type))))
- TEST_ERROR
+ TEST_ERROR;
if (NULL == (bkg = HDcalloc(sizeof(s1), DIM0 * DIM1)))
TEST_ERROR;
@@ -776,9 +776,9 @@ test_compound_dtype(hid_t file)
/* Read the dataset back. Temporary buffer is for special platforms like
* Cray */
if (NULL == (tmp = HDmalloc(DIM0 * DIM1 * H5Tget_size(native_type))))
- TEST_ERROR
+ TEST_ERROR;
if (NULL == (bkg = HDcalloc(sizeof(s1), DIM0 * DIM1)))
- TEST_ERROR
+ TEST_ERROR;
if (H5Dread(dataset, native_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, tmp) < 0)
TEST_ERROR;
@@ -1420,7 +1420,7 @@ test_enum_dtype(hid_t file)
/* Read the dataset back. Temporary buffer is for special platforms like
* Cray */
if (NULL == (tmp = HDmalloc(DIM0 * DIM1 * H5Tget_size(native_type))))
- TEST_ERROR
+ TEST_ERROR;
if (H5Dread(dataset, native_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, tmp) < 0)
TEST_ERROR;
@@ -1593,7 +1593,7 @@ test_array_dtype(hid_t file)
/* Read the dataset back. Temporary buffer is for special platforms like
* Cray */
if (NULL == (tmp = HDmalloc(DIM0 * DIM1 * H5Tget_size(native_type))))
- TEST_ERROR
+ TEST_ERROR;
if (H5Dread(dataset, native_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, tmp) < 0)
TEST_ERROR;
@@ -1752,7 +1752,7 @@ test_array_dtype2(hid_t file)
/* Read the dataset back. Temporary buffer is for special platforms like
* Cray */
if (NULL == (tmp = HDmalloc(DIM0 * DIM1 * H5Tget_size(native_type))))
- TEST_ERROR
+ TEST_ERROR;
if (H5Dread(dataset, native_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, tmp) < 0)
TEST_ERROR;
@@ -1875,7 +1875,7 @@ test_vl_dtype(hid_t file)
/* Create a VL datatype for disk storage */
if ((tid = H5Tvlen_create(tid2)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Create a dataset */
if ((dataset = H5Dcreate2(file, DSET_VL_NAME, tid, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -1943,7 +1943,7 @@ test_vl_dtype(hid_t file)
/* use temporary buffer to convert datatype. This is for special
* platforms like Cray */
if (NULL == (tmp = (void **)HDmalloc(t2->len * sizeof(unsigned int))))
- TEST_ERROR
+ TEST_ERROR;
HDmemcpy(tmp, t2->p, t2->len * H5Tget_size(nat_super_type));
if (H5Tconvert(nat_super_type, H5T_NATIVE_UINT, t2->len, tmp, NULL, H5P_DEFAULT) < 0)
@@ -2321,9 +2321,9 @@ test_refer_dtype(hid_t file)
/* Allocate write & read buffers */
if (NULL == (wbuf = (hobj_ref_t *)HDmalloc(MAX(sizeof(unsigned), sizeof(hobj_ref_t)))))
- TEST_ERROR
+ TEST_ERROR;
if (NULL == (rbuf = (hobj_ref_t *)HDmalloc(MAX(sizeof(unsigned), sizeof(hobj_ref_t)))))
- TEST_ERROR
+ TEST_ERROR;
/* Create dataspace for datasets */
if ((sid1 = H5Screate_simple(SPACE1_RANK, dims1, NULL)) < 0)
@@ -2331,7 +2331,7 @@ test_refer_dtype(hid_t file)
/* Create a group */
if ((group = H5Gcreate2(file, "Group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Create a datatype to refer to */
if ((tid1 = H5Tcreate(H5T_COMPOUND, sizeof(s1_t))) < 0)
@@ -2496,9 +2496,9 @@ test_refer_dtype2(hid_t file)
/* Allocate write & read buffers */
if (NULL == (dwbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2)))
- TEST_ERROR
+ TEST_ERROR;
if (NULL == (drbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), SPACE2_DIM1 * SPACE2_DIM2)))
- TEST_ERROR
+ TEST_ERROR;
/* Create dataspace for datasets */
if ((sid2 = H5Screate_simple(SPACE2_RANK, dims2, NULL)) < 0)
@@ -2973,33 +2973,33 @@ test_ninteger(void)
*/
/* create a file using default properties */
if ((fid1 = H5Fcreate("tstint1.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* create a data space */
if ((sid1 = H5Screate_simple(rank, dims, NULL)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* create dcpl */
if ((dcpl1 = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* create a dataset */
if ((did1 = H5Dcreate2(fid1, "dset", H5T_NATIVE_INT, sid1, H5P_DEFAULT, dcpl1, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* write */
if (H5Dwrite(did1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* close */
if (H5Sclose(sid1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Pclose(dcpl1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Dclose(did1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Fclose(fid1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*-------------------------------------------------------------------------
* step 2: open and create another file copying the data from file1
@@ -3008,78 +3008,78 @@ test_ninteger(void)
/* open */
if ((fid1 = H5Fopen("tstint1.h5", H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* open dataset */
if ((did1 = H5Dopen2(fid1, "dset", H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if ((sid1 = H5Dget_space(did1)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* get dcpl */
if ((dcpl1 = H5Dget_create_plist(did1)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* get file datatype */
if ((tid1 = H5Dget_type(did1)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* get native datatype */
if ((nid1 = H5Tget_native_type(tid1, H5T_DIR_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* get size */
if (H5Tget_size(nid1) == 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* get rank */
if ((rank = H5Sget_simple_extent_ndims(sid1)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
HDmemset(dims, 0, sizeof dims);
/* get dimension */
if (H5Sget_simple_extent_dims(sid1, dims, NULL) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* read */
if (H5Dread(did1, nid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, chk) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* create a file using default properties */
if ((fid2 = H5Fcreate("tstint2.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* create a dataset using the native type */
if ((did2 = H5Dcreate2(fid2, "dset", nid1, sid1, H5P_DEFAULT, dcpl1, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* write */
if (H5Dwrite(did2, nid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, chk) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* get dcpl */
if ((dcpl2 = H5Dget_create_plist(did2)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* get file datatype */
if ((tid2 = H5Dget_type(did2)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* get native datatype */
if ((nid2 = H5Tget_native_type(tid2, H5T_DIR_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* check */
if (H5Tget_precision(nid1) != H5Tget_precision(nid2)) {
HDprintf(" Precision differ.\n");
- TEST_ERROR
+ TEST_ERROR;
} /* end if */
/* compare dataset creation property lists */
if (H5Pequal(dcpl1, dcpl2) <= 0) {
HDprintf(" Property lists differ.\n");
- TEST_ERROR
+ TEST_ERROR;
} /* end if */
/* check */
@@ -3088,32 +3088,32 @@ test_ninteger(void)
H5_FAILED();
HDprintf(" Read different values than written.\n");
HDprintf(" At index %d\n", i);
- TEST_ERROR
+ TEST_ERROR;
} /* end if */
/* close */
if (H5Sclose(sid1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Pclose(dcpl1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Pclose(dcpl2) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Tclose(tid1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Tclose(tid2) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Tclose(nid1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Tclose(nid2) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Dclose(did1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Dclose(did2) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Fclose(fid1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Fclose(fid2) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
return 0;