From b698574fce26e8cf5134ea9268f1bca25baf9a46 Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Wed, 28 Jan 2009 12:19:09 -0500 Subject: [svn-r16370] Modify test_pack_ooo to always output the state of randomly generated variables when it fails, even in the sections that do not use the random variables. Tested: jam --- test/cmpd_dset.c | 82 +++++++++++++++++++++++++------------------------------- 1 file changed, 37 insertions(+), 45 deletions(-) diff --git a/test/cmpd_dset.c b/test/cmpd_dset.c index c05844e..d1f317f 100644 --- a/test/cmpd_dset.c +++ b/test/cmpd_dset.c @@ -1840,117 +1840,109 @@ test_pack_ooo(void) PASSED(); - /* Change to reverse ordering, insert compound last */ - for(i=0; ishared->u.compnd.packed) TEST_ERROR + if(NULL == (dt = (H5T_t *) H5I_object_verify(cmpd, H5I_DATATYPE))) PACK_OOO_ERROR + if(dt->shared->u.compnd.packed) PACK_OOO_ERROR /* Close the main compound */ - if(H5Tclose(cmpd) < 0) TEST_ERROR + if(H5Tclose(cmpd) < 0) PACK_OOO_ERROR PASSED(); TESTING("reverse member insertion with full compound subtype"); /* Complete the inner compound type */ - if(H5Tinsert(sub_cmpd, "int", 0, H5T_STD_I32LE) < 0) TEST_ERROR + if(H5Tinsert(sub_cmpd, "int", 0, H5T_STD_I32LE) < 0) PACK_OOO_ERROR /* Recreate main compound type */ - if((cmpd = H5Tcreate(H5T_COMPOUND, (4 * PACK_NMEMBS) + 1)) < 0) TEST_ERROR + if((cmpd = H5Tcreate(H5T_COMPOUND, (4 * PACK_NMEMBS) + 1)) < 0) PACK_OOO_ERROR - /* Insert the compound members in the reverse order previously generated */ + /* Insert the compound members in reverse order, with compound last */ for(i=0; ishared->u.compnd.packed) TEST_ERROR + if(NULL == (dt = (H5T_t *) H5I_object_verify(cmpd, H5I_DATATYPE))) PACK_OOO_ERROR + if(!dt->shared->u.compnd.packed) PACK_OOO_ERROR /* Close */ - if(H5Tclose(cmpd) < 0) TEST_ERROR - if(H5Tclose(sub_cmpd) < 0) TEST_ERROR + if(H5Tclose(cmpd) < 0) PACK_OOO_ERROR + if(H5Tclose(sub_cmpd) < 0) PACK_OOO_ERROR PASSED(); - /* Change to forward ordering, insert compound first */ - sub_cmpd_order = 0; - TESTING("forward member insertion with empty compound subtype"); /* Create inner compound type. It will be empty for the first run */ - if((sub_cmpd = H5Tcreate(H5T_COMPOUND, 4)) < 0) TEST_ERROR + if((sub_cmpd = H5Tcreate(H5T_COMPOUND, 4)) < 0) PACK_OOO_ERROR /* Create main compound type, with extra space at the end */ - if((cmpd = H5Tcreate(H5T_COMPOUND, (4 * PACK_NMEMBS) + 1)) < 0) TEST_ERROR + if((cmpd = H5Tcreate(H5T_COMPOUND, (4 * PACK_NMEMBS) + 1)) < 0) PACK_OOO_ERROR - /* Insert the compound members in forward order */ + /* Insert the compound members in forward order, with compound first */ for(i=0; ishared->u.compnd.packed) TEST_ERROR + if(NULL == (dt = (H5T_t *) H5I_object_verify(cmpd, H5I_DATATYPE))) PACK_OOO_ERROR + if(dt->shared->u.compnd.packed) PACK_OOO_ERROR /* Close the main compound */ - if(H5Tclose(cmpd) < 0) TEST_ERROR + if(H5Tclose(cmpd) < 0) PACK_OOO_ERROR PASSED(); TESTING("forward member insertion with full compound subtype"); /* Complete the inner compound type */ - if(H5Tinsert(sub_cmpd, "int", 0, H5T_STD_I32LE) < 0) TEST_ERROR + if(H5Tinsert(sub_cmpd, "int", 0, H5T_STD_I32LE) < 0) PACK_OOO_ERROR /* Recreate main compound type */ - if((cmpd = H5Tcreate(H5T_COMPOUND, (4 * PACK_NMEMBS) + 1)) < 0) TEST_ERROR + if((cmpd = H5Tcreate(H5T_COMPOUND, (4 * PACK_NMEMBS) + 1)) < 0) PACK_OOO_ERROR /* Insert the compound members in forward order */ for(i=0; ishared->u.compnd.packed) TEST_ERROR + if(NULL == (dt = (H5T_t *) H5I_object_verify(cmpd, H5I_DATATYPE))) PACK_OOO_ERROR + if(!dt->shared->u.compnd.packed) PACK_OOO_ERROR /* Close */ - if(H5Tclose(cmpd) < 0) TEST_ERROR - if(H5Tclose(sub_cmpd) < 0) TEST_ERROR + if(H5Tclose(cmpd) < 0) PACK_OOO_ERROR + if(H5Tclose(sub_cmpd) < 0) PACK_OOO_ERROR PASSED(); -- cgit v0.12