summaryrefslogtreecommitdiffstats
path: root/test/th5s.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>1998-07-06 21:01:59 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>1998-07-06 21:01:59 (GMT)
commit650e88756c4d81f819141d28e9239fbb6446ed30 (patch)
treeb072d230ee7c60c7ab3548e04d291f81b8c1ceda /test/th5s.c
parent43f13aeca28a722d6436d43dcd84a59918dc0950 (diff)
downloadhdf5-650e88756c4d81f819141d28e9239fbb6446ed30.zip
hdf5-650e88756c4d81f819141d28e9239fbb6446ed30.tar.gz
hdf5-650e88756c4d81f819141d28e9239fbb6446ed30.tar.bz2
[svn-r452] Changed tests to use the new dataspace API calls. Still need to add tests for
point selections and strides.
Diffstat (limited to 'test/th5s.c')
-rw-r--r--test/th5s.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/test/th5s.c b/test/th5s.c
index be866af..4102ea9 100644
--- a/test/th5s.c
+++ b/test/th5s.c
@@ -47,6 +47,10 @@ static char RcsId[] = "$Revision$";
#define SPACE2_DIM2 15
#define SPACE2_DIM3 13
#define SPACE2_DIM4 23
+#define SPACE2_MAX1 H5S_UNLIMITED
+#define SPACE2_MAX2 15
+#define SPACE2_MAX3 13
+#define SPACE2_MAX4 23
/* Scalar dataset with simple datatype */
#define SPACE3_NAME "Scalar1"
@@ -83,9 +87,10 @@ test_h5s_basic(void)
hid_t sid1, sid2; /* Dataspace ID */
unsigned 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};
+ hsize_t dims2[] = {SPACE2_DIM1, SPACE2_DIM2, SPACE2_DIM3, SPACE2_DIM4};
+ hsize_t max2[] = {SPACE2_MAX1, SPACE2_MAX2, SPACE2_MAX3, SPACE2_MAX4};
hsize_t tdims[4]; /* Dimension array to test with */
+ hsize_t tmax[4];
size_t n; /* Number of dataspace elements */
herr_t ret; /* Generic return value */
@@ -112,7 +117,7 @@ test_h5s_basic(void)
VERIFY(HDmemcmp(tdims, dims1, SPACE1_RANK * sizeof(unsigned)), 0,
"H5Sget_ldims");
- sid2 = H5Screate_simple(SPACE2_RANK, dims2, NULL);
+ sid2 = H5Screate_simple(SPACE2_RANK, dims2, max2);
CHECK(sid2, FAIL, "H5Screate_simple");
n = H5Sget_npoints(sid2);
@@ -124,10 +129,12 @@ test_h5s_basic(void)
CHECK(rank, UFAIL, "H5Sget_lrank");
VERIFY(rank, SPACE2_RANK, "H5Sget_lrank");
- ret = H5Sget_dims(sid2, tdims, NULL);
+ ret = H5Sget_dims(sid2, tdims, tmax);
CHECK(ret, FAIL, "H5Sget_ldims");
VERIFY(HDmemcmp(tdims, dims2, SPACE2_RANK * sizeof(unsigned)), 0,
"H5Sget_ldims");
+ VERIFY(HDmemcmp(tmax, max2, SPACE2_RANK * sizeof(unsigned)), 0,
+ "H5Sget_ldims");
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");