summaryrefslogtreecommitdiffstats
path: root/test/tselect.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>1998-07-24 20:46:31 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>1998-07-24 20:46:31 (GMT)
commit14ea12a6baba9dfb4d63ce8579242a375d78c6a4 (patch)
tree82c6afd387f56f1ed692ec789c7449b06e7ad7ea /test/tselect.c
parent3a6a09d4fd01762c9ea32f3935887a91f0df6dab (diff)
downloadhdf5-14ea12a6baba9dfb4d63ce8579242a375d78c6a4.zip
hdf5-14ea12a6baba9dfb4d63ce8579242a375d78c6a4.tar.gz
hdf5-14ea12a6baba9dfb4d63ce8579242a375d78c6a4.tar.bz2
[svn-r545] Added test for H5Sselect_none call.
Diffstat (limited to 'test/tselect.c')
-rw-r--r--test/tselect.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/test/tselect.c b/test/tselect.c
index d97307b..29fff74 100644
--- a/test/tselect.c
+++ b/test/tselect.c
@@ -422,7 +422,19 @@ test_select_all(void)
ret = H5Sselect_hyperslab(sid2,H5S_SELECT_SET,start,stride,count,block);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
- /* Read selection from disk */
+ /* Select no extent for disk dataset */
+ ret = H5Sselect_none(sid1);
+ CHECK(ret, FAIL, "H5Sselect_all");
+
+ /* Read selection from disk (should fail with no selection defined) */
+ ret=H5Dread(dataset,H5T_NATIVE_UCHAR,sid2,sid1,H5P_DEFAULT,rbuf);
+ VERIFY(ret, FAIL, "H5Dread");
+
+ /* Select entire 15x26 extent for disk dataset */
+ ret = H5Sselect_all(sid1);
+ CHECK(ret, FAIL, "H5Sselect_all");
+
+ /* Read selection from disk (should work now) */
ret=H5Dread(dataset,H5T_NATIVE_UCHAR,sid2,sid1,H5P_DEFAULT,rbuf);
CHECK(ret, FAIL, "H5Dread");
@@ -1090,7 +1102,7 @@ test_select(void)
/* These next tests use the same file */
test_select_hyper(); /* Test basic H5S hyperslab selection code */
test_select_point(); /* Test basic H5S element selection code */
- test_select_all(); /* Test basic all selection code */
+ test_select_all(); /* Test basic all & none selection code */
test_select_combo(); /* Test combined hyperslab & element selection code */
test_select_hyper_stride(); /* Test strided hyperslab selection code */
test_select_hyper_copy(); /* Test hyperslab selection copying code */