summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2001-03-16 18:17:25 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2001-03-16 18:17:25 (GMT)
commit09a8e85f27c6d999815ff625c3b87b3c69978c57 (patch)
treeec942ad95ddf3a6581647b955dfd13b7fcd46606 /test
parent1d771c6949222616e9f32d99daaf4fb793bec7ba (diff)
downloadhdf5-09a8e85f27c6d999815ff625c3b87b3c69978c57.zip
hdf5-09a8e85f27c6d999815ff625c3b87b3c69978c57.tar.gz
hdf5-09a8e85f27c6d999815ff625c3b87b3c69978c57.tar.bz2
[svn-r3652] Purpose:
Code cleanup Description: Binh-Minh found several places where parameters and/or return-values in the tests were not matching the current parameters for functions in the library. Solution: Walked through the code and aligned the parameters and return-values with the current functions. Platforms tested: FreeBSD 4.2 (hawkwind)
Diffstat (limited to 'test')
-rw-r--r--test/th5s.c76
1 files changed, 38 insertions, 38 deletions
diff --git a/test/th5s.c b/test/th5s.c
index ccec8c2..8d25978 100644
--- a/test/th5s.c
+++ b/test/th5s.c
@@ -87,7 +87,7 @@ test_h5s_basic(void)
hid_t fid1; /* HDF5 File IDs */
hid_t sid1, sid2; /* Dataspace ID */
hid_t dset1; /* Dataset ID */
- unsigned rank; /* Logical rank of dataspace */
+ int rank; /* Logical rank of dataspace */
hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3};
hsize_t dims2[] = {SPACE2_DIM1, SPACE2_DIM2, SPACE2_DIM3,
SPACE2_DIM4};
@@ -96,7 +96,7 @@ test_h5s_basic(void)
SPACE2_MAX4};
hsize_t tdims[4]; /* Dimension array to test with */
hsize_t tmax[4];
- size_t n; /* Number of dataspace elements */
+ hssize_t n; /* Number of dataspace elements */
herr_t ret; /* Generic return value */
/* Output message about test being performed */
@@ -106,16 +106,16 @@ test_h5s_basic(void)
CHECK(sid1, FAIL, "H5Screate_simple");
n = H5Sget_simple_extent_npoints(sid1);
- CHECK(n, UFAIL, "H5Sget_simple_extent_npoints");
+ CHECK(n, FAIL, "H5Sget_simple_extent_npoints");
VERIFY(n, SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3,
"H5Sget_simple_extent_npoints");
rank = H5Sget_simple_extent_ndims(sid1);
- CHECK(rank, UFAIL, "H5Sget_simple_extent_ndims");
+ CHECK(rank, FAIL, "H5Sget_simple_extent_ndims");
VERIFY(rank, SPACE1_RANK, "H5Sget_simple_extent_ndims");
- ret = H5Sget_simple_extent_dims(sid1, tdims, NULL);
- CHECK(ret, FAIL, "H5Sget_simple_extent_dims");
+ rank = H5Sget_simple_extent_dims(sid1, tdims, NULL);
+ CHECK(rank, FAIL, "H5Sget_simple_extent_dims");
VERIFY(HDmemcmp(tdims, dims1, SPACE1_RANK * sizeof(unsigned)), 0,
"H5Sget_simple_extent_dims");
@@ -123,16 +123,16 @@ test_h5s_basic(void)
CHECK(sid2, FAIL, "H5Screate_simple");
n = H5Sget_simple_extent_npoints(sid2);
- CHECK(n, UFAIL, "H5Sget_simple_extent_npoints");
+ CHECK(n, FAIL, "H5Sget_simple_extent_npoints");
VERIFY(n, SPACE2_DIM1 * SPACE2_DIM2 * SPACE2_DIM3 * SPACE2_DIM4,
"H5Sget_simple_extent_npoints");
rank = H5Sget_simple_extent_ndims(sid2);
- CHECK(rank, UFAIL, "H5Sget_simple_extent_ndims");
+ CHECK(rank, FAIL, "H5Sget_simple_extent_ndims");
VERIFY(rank, SPACE2_RANK, "H5Sget_simple_extent_ndims");
- ret = H5Sget_simple_extent_dims(sid2, tdims, tmax);
- CHECK(ret, FAIL, "H5Sget_simple_extent_dims");
+ rank = H5Sget_simple_extent_dims(sid2, tdims, tmax);
+ CHECK(rank, FAIL, "H5Sget_simple_extent_dims");
VERIFY(HDmemcmp(tdims, dims2, SPACE2_RANK * sizeof(unsigned)), 0,
"H5Sget_simple_extent_dims");
VERIFY(HDmemcmp(tmax, max2, SPACE2_RANK * sizeof(unsigned)), 0,
@@ -207,14 +207,14 @@ test_h5s_scalar_write(void)
hid_t fid1; /* HDF5 File IDs */
hid_t dataset; /* Dataset ID */
hid_t sid1; /* Dataspace ID */
- unsigned rank; /* Logical rank of dataspace */
+ int rank; /* Logical rank of dataspace */
hsize_t tdims[4]; /* Dimension array to test with */
- size_t n; /* Number of dataspace elements */
+ hssize_t n; /* Number of dataspace elements */
H5S_class_t ext_type; /* Extent type */
herr_t ret; /* Generic return value */
/* Output message about test being performed */
- MESSAGE(5, ("Testing Scalar Dataspace Manipulation\n"));
+ MESSAGE(5, ("Testing Scalar Dataspace Manipulation during Writing\n"));
/* Create file */
fid1 = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -225,15 +225,15 @@ test_h5s_scalar_write(void)
CHECK(sid1, FAIL, "H5Screate_simple");
n = H5Sget_simple_extent_npoints(sid1);
- CHECK(n, UFAIL, "H5Sget_simple_extent_npoints");
+ CHECK(n, FAIL, "H5Sget_simple_extent_npoints");
VERIFY(n, 1, "H5Sget_simple_extent_npoints");
rank = H5Sget_simple_extent_ndims(sid1);
- CHECK(rank, UFAIL, "H5Sget_simple_extent_ndims");
+ CHECK(rank, FAIL, "H5Sget_simple_extent_ndims");
VERIFY(rank, SPACE3_RANK, "H5Sget_simple_extent_ndims");
- ret = H5Sget_simple_extent_dims(sid1, tdims, NULL);
- VERIFY(ret, 0, "H5Sget_simple_extent_dims");
+ rank = H5Sget_simple_extent_dims(sid1, tdims, NULL);
+ VERIFY(rank, 0, "H5Sget_simple_extent_dims");
/* Verify extent type */
ext_type = H5Sget_simple_extent_type(sid1);
@@ -270,14 +270,14 @@ test_h5s_scalar_read(void)
hid_t fid1; /* HDF5 File IDs */
hid_t dataset; /* Dataset ID */
hid_t sid1; /* Dataspace ID */
- unsigned rank; /* Logical rank of dataspace */
+ int rank; /* Logical rank of dataspace */
hsize_t tdims[4]; /* Dimension array to test with */
- size_t n; /* Number of dataspace elements */
+ hssize_t n; /* Number of dataspace elements */
unsigned rdata; /* Scalar data read in */
herr_t ret; /* Generic return value */
/* Output message about test being performed */
- MESSAGE(5, ("Testing Scalar Dataspace Manipulation\n"));
+ MESSAGE(5, ("Testing Scalar Dataspace Manipulation during Reading\n"));
/* Create file */
fid1 = H5Fopen(FILE, H5F_ACC_RDWR, H5P_DEFAULT);
@@ -291,15 +291,15 @@ test_h5s_scalar_read(void)
CHECK(sid1, FAIL, "H5Dget_space");
n = H5Sget_simple_extent_npoints(sid1);
- CHECK(n, UFAIL, "H5Sget_simple_extent_npoints");
+ CHECK(n, FAIL, "H5Sget_simple_extent_npoints");
VERIFY(n, 1, "H5Sget_simple_extent_npoints");
rank = H5Sget_simple_extent_ndims(sid1);
- CHECK(rank, UFAIL, "H5Sget_simple_extent_ndims");
+ CHECK(rank, FAIL, "H5Sget_simple_extent_ndims");
VERIFY(rank, SPACE3_RANK, "H5Sget_simple_extent_ndims");
- ret = H5Sget_simple_extent_dims(sid1, tdims, NULL);
- VERIFY(ret, 0, "H5Sget_simple_extent_dims");
+ rank = H5Sget_simple_extent_dims(sid1, tdims, NULL);
+ VERIFY(rank, 0, "H5Sget_simple_extent_dims");
ret = H5Dread(dataset, H5T_NATIVE_UINT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &rdata);
CHECK(ret, FAIL, "H5Dread");
@@ -331,13 +331,13 @@ test_h5s_compound_scalar_write(void)
hid_t dataset; /* Dataset ID */
hid_t tid1; /* Attribute datatype ID */
hid_t sid1; /* Dataspace ID */
- unsigned rank; /* Logical rank of dataspace */
+ int rank; /* Logical rank of dataspace */
hsize_t tdims[4]; /* Dimension array to test with */
- size_t n; /* Number of dataspace elements */
+ hssize_t n; /* Number of dataspace elements */
herr_t ret; /* Generic return value */
/* Output message about test being performed */
- MESSAGE(5, ("Testing Scalar Dataspace Manipulation\n"));
+ MESSAGE(5, ("Testing Scalar Dataspace Manipulation for Writing Compound Datatypes\n"));
/* Create file */
fid1 = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -368,15 +368,15 @@ test_h5s_compound_scalar_write(void)
CHECK(sid1, FAIL, "H5Screate_simple");
n = H5Sget_simple_extent_npoints(sid1);
- CHECK(n, UFAIL, "H5Sget_simple_extent_npoints");
+ CHECK(n, FAIL, "H5Sget_simple_extent_npoints");
VERIFY(n, 1, "H5Sget_simple_extent_npoints");
rank = H5Sget_simple_extent_ndims(sid1);
- CHECK(rank, UFAIL, "H5Sget_simple_extent_ndims");
+ CHECK(rank, FAIL, "H5Sget_simple_extent_ndims");
VERIFY(rank, SPACE3_RANK, "H5Sget_simple_extent_ndims");
- ret = H5Sget_simple_extent_dims(sid1, tdims, NULL);
- VERIFY(ret, 0, "H5Sget_simple_extent_dims");
+ rank = H5Sget_simple_extent_dims(sid1, tdims, NULL);
+ VERIFY(rank, 0, "H5Sget_simple_extent_dims");
/* Create a dataset */
dataset=H5Dcreate(fid1,"Dataset1",tid1,sid1,H5P_DEFAULT);
@@ -411,14 +411,14 @@ test_h5s_compound_scalar_read(void)
hid_t dataset; /* Dataset ID */
hid_t sid1; /* Dataspace ID */
hid_t type; /* Datatype */
- unsigned rank; /* Logical rank of dataspace */
+ int rank; /* Logical rank of dataspace */
hsize_t tdims[4]; /* Dimension array to test with */
- size_t n; /* Number of dataspace elements */
+ hssize_t n; /* Number of dataspace elements */
struct space4_struct rdata; /* Scalar data read in */
herr_t ret; /* Generic return value */
/* Output message about test being performed */
- MESSAGE(5, ("Testing Scalar Dataspace Manipulation\n"));
+ MESSAGE(5, ("Testing Scalar Dataspace Manipulation for Reading Compound Datatypes\n"));
/* Create file */
fid1 = H5Fopen(FILE, H5F_ACC_RDWR, H5P_DEFAULT);
@@ -432,15 +432,15 @@ test_h5s_compound_scalar_read(void)
CHECK(sid1, FAIL, "H5Dget_space");
n = H5Sget_simple_extent_npoints(sid1);
- CHECK(n, UFAIL, "H5Sget_simple_extent_npoints");
+ CHECK(n, FAIL, "H5Sget_simple_extent_npoints");
VERIFY(n, 1, "H5Sget_simple_extent_npoints");
rank = H5Sget_simple_extent_ndims(sid1);
- CHECK(rank, UFAIL, "H5Sget_simple_extent_ndims");
+ CHECK(rank, FAIL, "H5Sget_simple_extent_ndims");
VERIFY(rank, SPACE3_RANK, "H5Sget_simple_extent_ndims");
- ret = H5Sget_simple_extent_dims(sid1, tdims, NULL);
- VERIFY(ret, 0, "H5Sget_simple_extent_dims");
+ rank = H5Sget_simple_extent_dims(sid1, tdims, NULL);
+ VERIFY(rank, 0, "H5Sget_simple_extent_dims");
type=H5Dget_type(dataset);
CHECK(type, FAIL, "H5Dget_type");