summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2015-03-26 19:24:25 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2015-03-26 19:24:25 (GMT)
commiteafd204b2d53186c3adade5e1b5c984effa6b9ca (patch)
treec545f7a7486e2b887fa8cb6a9303aa63d8c6a112 /test
parentc4ec20a6de26d3f748dc87d15226961983fc81c3 (diff)
downloadhdf5-eafd204b2d53186c3adade5e1b5c984effa6b9ca.zip
hdf5-eafd204b2d53186c3adade5e1b5c984effa6b9ca.tar.gz
hdf5-eafd204b2d53186c3adade5e1b5c984effa6b9ca.tar.bz2
[svn-r26607] Correct test of plugin read when disabled to not print FAILURE when successful
Diffstat (limited to 'test')
-rw-r--r--test/plugin.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/test/plugin.c b/test/plugin.c
index 02007d5..74a8f4b 100644
--- a/test/plugin.c
+++ b/test/plugin.c
@@ -536,16 +536,17 @@ error:
*-------------------------------------------------------------------------
*/
static herr_t
-test_noread_data(hid_t dataset, int *origin_data)
+test_noread_data(hid_t dataset)
{
- int check[DSET_DIM1][DSET_DIM2];
- const hsize_t size[2] = {DSET_DIM1, DSET_DIM2}; /* Dataspace dimensions */
- int *data_p = origin_data;
- size_t i, j; /* Local index variables */
+ int check[DSET_DIM1][DSET_DIM2];
+ herr_t ret;
/* Read the dataset back */
- if(H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, check) >= 0)
- TEST_ERROR;
+ H5E_BEGIN_TRY {
+ ret = H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, check);
+ } H5E_END_TRY
+ if(ret >= 0)
+ TEST_ERROR
PASSED();
return 0;
@@ -578,7 +579,7 @@ test_noread_with_filters(hid_t file)
if((dset = H5Dopen2(file,DSET_DYNLIB1_NAME,H5P_DEFAULT)) < 0) TEST_ERROR
- if(test_noread_data(dset, (int *)points_dynlib1) < 0) TEST_ERROR
+ if(test_noread_data(dset) < 0) TEST_ERROR
if(H5Dclose(dset) < 0) TEST_ERROR