diff options
author | jake.smith <jake.smith@hdfgroup.org> | 2019-01-04 17:46:54 (GMT) |
---|---|---|
committer | jake.smith <jake.smith@hdfgroup.org> | 2019-01-04 17:46:54 (GMT) |
commit | 46bf1647d40bfab34f4d7726cbd8ae9668d1759f (patch) | |
tree | 82dc7a08a4469d3c6e72e0a12d9552092e31bc24 | |
parent | f012602d3ad81b63c861db4ebdd792c86d3ddae6 (diff) | |
parent | f7115c31363e80e850c0a228e63a5a035c48b74a (diff) | |
download | hdf5-46bf1647d40bfab34f4d7726cbd8ae9668d1759f.zip hdf5-46bf1647d40bfab34f4d7726cbd8ae9668d1759f.tar.gz hdf5-46bf1647d40bfab34f4d7726cbd8ae9668d1759f.tar.bz2 |
Merge pull request #1430 in HDFFV/hdf5 from ~JAKE.SMITH/hdf5:dset_ohdr_minimize to develop
* commit 'f7115c31363e80e850c0a228e63a5a035c48b74a':
Remove "bad" statements at end of TEST_ERROR. Formerly arguments to FAIL_PUTS_ERROR
Add semicolon at end of TEST_ERROR() invocation for consistency.
-rw-r--r-- | test/dsets.c | 41 |
1 files changed, 17 insertions, 24 deletions
diff --git a/test/dsets.c b/test/dsets.c index 2c012c7..5de9cfa 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -13072,15 +13072,13 @@ test_object_header_minimization_dcpl(void) /*********/ if(NULL == h5_fixname(OHMIN_FILENAME_A, H5P_DEFAULT, filename, sizeof(filename))) - TEST_ERROR("unable to prepare filename") + TEST_ERROR file_id = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - if (0 > file_id) - TEST_ERROR("unable to create test file\n"); + if (0 > file_id) TEST_ERROR dcpl_id = H5Pcreate(H5P_DATASET_CREATE); - if (0 > dcpl_id) - TEST_ERROR("unable to create DCPL\n"); + if (0 > dcpl_id) TEST_ERROR /*********/ /* TESTS */ @@ -13088,28 +13086,23 @@ test_object_header_minimization_dcpl(void) /* default value (not set explicitly) */ - if (H5Pget_dset_no_attrs_hint(dcpl_id, &minimize) == FAIL) - TEST_ERROR("unable to get minimize value\n"); + if (H5Pget_dset_no_attrs_hint(dcpl_id, &minimize) == FAIL) TEST_ERROR if (FALSE != minimize) - TEST_ERROR("Expected FALSE default but was not!\n"); + TEST_ERROR /* FALSE-set value */ - if (H5Pset_dset_no_attrs_hint(dcpl_id, FALSE) == FAIL) - TEST_ERROR("unable to set minimize value to FALSE\n"); - if (H5Pget_dset_no_attrs_hint(dcpl_id, &minimize) == FAIL) - TEST_ERROR("unable to get minimize value\n"); + if (H5Pset_dset_no_attrs_hint(dcpl_id, FALSE) == FAIL) TEST_ERROR + if (H5Pget_dset_no_attrs_hint(dcpl_id, &minimize) == FAIL) TEST_ERROR if (FALSE != minimize) - TEST_ERROR("Expected FALSE default but was not!\n"); + TEST_ERROR /* TRUE-set value */ - if (H5Pset_dset_no_attrs_hint(dcpl_id, TRUE) == FAIL) - TEST_ERROR("unable to set minimize value to TRUE\n"); - if (H5Pget_dset_no_attrs_hint(dcpl_id, &minimize) == FAIL) - TEST_ERROR("unable to get minimize value\n"); + if (H5Pset_dset_no_attrs_hint(dcpl_id, TRUE) == FAIL) TEST_ERROR + if (H5Pget_dset_no_attrs_hint(dcpl_id, &minimize) == FAIL) TEST_ERROR if (TRUE != minimize) - TEST_ERROR("Expected TRUE default but was not!\n"); + TEST_ERROR /* error cases */ @@ -13117,35 +13110,35 @@ test_object_header_minimization_dcpl(void) ret = H5Pget_dset_no_attrs_hint(-1, &minimize); } H5E_END_TRY; if (ret == SUCCEED) - TEST_ERROR("Invalid DCPL ID should fail\n"); + TEST_ERROR /* Invalid DCPL ID should fail */ H5E_BEGIN_TRY { ret = H5Pset_dset_no_attrs_hint(-1, FALSE); } H5E_END_TRY; if (ret == SUCCEED) - TEST_ERROR("Invalid DCPL ID should fail\n"); + TEST_ERROR /* Invalid DCPL ID should fail */ H5E_BEGIN_TRY { ret = H5Pset_dset_no_attrs_hint(-1, TRUE); } H5E_END_TRY; if (ret == SUCCEED) - TEST_ERROR("Invalid DCPL ID should fail\n"); + TEST_ERROR /* Invalid DCPL ID should fail */ H5E_BEGIN_TRY { ret = H5Pget_dset_no_attrs_hint(dcpl_id, NULL); } H5E_END_TRY; if (ret == SUCCEED) - TEST_ERROR("NULL out pointer should fail\n"); + TEST_ERROR /* NULL out pointer should fail */ /************/ /* TEARDOWN */ /************/ if (H5Fclose(file_id) == FAIL) - TEST_ERROR("can't close FILE"); + TEST_ERROR if (H5Pclose(dcpl_id) == FAIL) - TEST_ERROR("unable to close DCPL\n"); + TEST_ERROR PASSED(); return SUCCEED; |