summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2008-01-09 22:18:47 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2008-01-09 22:18:47 (GMT)
commit0545c915c368b69e613b4b86108ad0b1d644b3d4 (patch)
treed8226a2da5960b4537ff711ebc74c3137e034795 /test
parentb58ac6c8eef426e408a53a1aee5a6651eebfa5e8 (diff)
downloadhdf5-0545c915c368b69e613b4b86108ad0b1d644b3d4.zip
hdf5-0545c915c368b69e613b4b86108ad0b1d644b3d4.tar.gz
hdf5-0545c915c368b69e613b4b86108ad0b1d644b3d4.tar.bz2
[svn-r14389] Changed some test cases to use H5Sselect_elements instead of H5Sselect_hyperslab for test
purpose. Tested on smirom only. Simple changes.
Diffstat (limited to 'test')
-rw-r--r--test/tcoords.c34
1 files changed, 22 insertions, 12 deletions
diff --git a/test/tcoords.c b/test/tcoords.c
index 0b04f6d..57d2e1a 100644
--- a/test/tcoords.c
+++ b/test/tcoords.c
@@ -45,18 +45,28 @@ static void test_single_end(hid_t file)
/* For testing the full selection in the fastest-growing end */
int mem1_buffer[1][1][6][2];
hsize_t mem1_dims[4] = { 1, 1, 6, 2 };
- hsize_t mem1_start[4] = { 0, 0, 0, 0 };
- hsize_t mem1_count[4] = { 1, 1, 1, 1 };
- hsize_t mem1_stride[4] = { 1, 1, 1, 1 };
- hsize_t mem1_block[4] = { 1, 1, 6, 2 };
+ hsize_t da_elmts1[12][4] = { {0, 0, 0, 0},
+ {0, 0, 0, 1},
+ {0, 0, 1, 0},
+ {0, 0, 1, 1},
+ {0, 0, 2, 0},
+ {0, 0, 2, 1},
+ {0, 0, 3, 0},
+ {0, 0, 3, 1},
+ {0, 0, 4, 0},
+ {0, 0, 4, 1},
+ {0, 0, 5, 0},
+ {0, 0, 5, 1} };
/* For testing the full selection in the slowest-growing end */
int mem2_buffer[2][3][1][1];
hsize_t mem2_dims[4] = { 2, 3, 1, 1 };
- hsize_t mem2_start[4] = { 0, 0, 0, 0 };
- hsize_t mem2_count[4] = { 1, 1, 1, 1 };
- hsize_t mem2_stride[4] = { 1, 1, 1, 1 };
- hsize_t mem2_block[4] = { 2, 3, 1, 1 };
+ hsize_t da_elmts2[6][4] = { {0, 0, 0, 0},
+ {0, 1, 0, 0},
+ {0, 2, 0, 0},
+ {1, 0, 0, 0},
+ {1, 1, 0, 0},
+ {1, 2, 0, 0} };
/* For testing the full selection in the middle dimensions */
int mem3_buffer[1][3][6][1];
@@ -101,8 +111,8 @@ static void test_single_end(hid_t file)
CHECK(did, FAIL, "H5Dopen");
/* Select the elements in the dataset */
- ret = H5Sselect_hyperslab(sid, H5S_SELECT_SET, mem1_start, mem1_stride, mem1_count, mem1_block);
- CHECK(ret, FAIL, "H5Sselect_hyperslab");
+ ret = H5Sselect_elements(sid, H5S_SELECT_SET, 12, (const hsize_t**)da_elmts1);
+ CHECK(ret, FAIL, "H5Sselect_elements");
msid = H5Screate_simple(4, mem1_dims, mem1_dims);
CHECK(msid, FAIL, "H5Screate_simple");
@@ -131,8 +141,8 @@ static void test_single_end(hid_t file)
CHECK(did, FAIL, "H5Dopen");
/* Select the elements in the dataset */
- ret = H5Sselect_hyperslab(sid, H5S_SELECT_SET, mem2_start, mem2_stride, mem2_count, mem2_block);
- CHECK(ret, FAIL, "H5Sselect_hyperslab");
+ ret = H5Sselect_elements(sid, H5S_SELECT_SET, 6, (const hsize_t**)da_elmts2);
+ CHECK(ret, FAIL, "H5Sselect_elements");
msid = H5Screate_simple(4, mem2_dims, mem2_dims);
CHECK(msid, FAIL, "H5Screate_simple");