VERIFY(size, PROP2_SIZE, "H5Pget_size");
/* Check values of properties (set with default values) */
ret = H5Pget(lid1, PROP1_NAME,&prop1_value);
VERIFY(prop1_value, *PROP1_DEF_VALUE, "H5Pget");
ret = H5Pget(lid1, PROP2_NAME,&prop2_value);
/* Verify the floating-poing value in this way to avoid compiler warning. */
if(!FLT_ABS_EQUAL(prop2_value,*PROP2_DEF_VALUE))
printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n",
HDprintf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n",
"H5Pget", *PROP2_DEF_VALUE, prop2_value, (int)__LINE__, __FILE__);
CHECK_I(ret, "H5Pclose");
ret = H5Pclose_class(cid1);
CHECK_I(ret, "H5Pclose_class");
VERIFY(ret, 1, "H5Pexist");
/* Check values of permanent properties (set with default values) */
ret = H5Pget(lid1, PROP1_NAME,&prop1_value);
VERIFY(prop1_value, *PROP1_DEF_VALUE, "H5Pget");
ret = H5Pget(lid1, PROP2_NAME,&prop2_value);
/* Verify the floating-poing value in this way to avoid compiler warning. */
if(!FLT_ABS_EQUAL(prop2_value,*PROP2_DEF_VALUE))
printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n",
HDprintf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n",
"H5Pget", *PROP2_DEF_VALUE, prop2_value, (int)__LINE__, __FILE__);
/* Check values of temporary properties (set with regular values) */
ret = H5Pget(lid1, PROP3_NAME,&prop3_value);
if(HDmemcmp(&prop3_value, PROP3_DEF_VALUE, PROP3_SIZE)!=0)
TestErrPrintf("Property #3 doesn't match!, line=%d\n",__LINE__);
ret = H5Pget(lid1, PROP4_NAME,&prop4_value);
/* Verify the floating-poing value in this way to avoid compiler warning. */
if(!FLT_ABS_EQUAL(prop4_value,*PROP4_DEF_VALUE))
printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n",
HDprintf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n",
"H5Pget", *PROP4_DEF_VALUE, prop4_value, (int)__LINE__, __FILE__);
/* Delete permanent property */
ret = H5Premove(lid1, PROP2_NAME);
CHECK_I(ret, "H5Premove");
/* Check number of properties */
ret = H5Pget_nprops(lid1,&nprops);
CHECK_I(ret, "H5Pget_nprops");
VERIFY(nprops, 3, "H5Pget_nprops");
/* Check values of permanent properties (set with default values) */
ret = H5Pget(lid1, PROP1_NAME,&prop1_value);
VERIFY(prop1_value, *PROP1_DEF_VALUE, "H5Pget");
/* Check values of temporary properties (set with regular values) */
ret = H5Pget(lid1, PROP4_NAME,&prop4_value);
/* Verify the floating-poing value in this way to avoid compiler warning. */
if(!FLT_ABS_EQUAL(prop4_value,*PROP4_DEF_VALUE))
printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n",
HDprintf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n",
"H5Pget", *PROP4_DEF_VALUE, prop4_value, (int)__LINE__, __FILE__);
CHECK_I(ret, "H5Pclose");
ret = H5Pclose_class(cid1);
CHECK_I(ret, "H5Pclose_class");
ret = H5Pget(lid1, PROP1_NAME,&prop1_value);
VERIFY(prop1_value, *PROP1_DEF_VALUE, "H5Pget");
/* The compare callback should have been called once (to check if the get
* callback modified the value) */
VERIFY(prop1_cb_info.cmp_count, 2, "H5Pget");
ret = H5Pget(lid1, PROP2_NAME,&prop2_value);
/* Verify the floating-poing value in this way to avoid compiler warning. */
if(!FLT_ABS_EQUAL(prop2_value,*PROP2_DEF_VALUE))
printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n",
HDprintf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n",
"H5Pget", *PROP2_DEF_VALUE, prop2_value, (int)__LINE__, __FILE__);
/* Check values of temporary properties (set with regular values) */
ret = H5Pget(lid1, PROP3_NAME,&prop3_value);
if(HDmemcmp(&prop3_value, PROP3_DEF_VALUE, PROP3_SIZE)!=0)
TestErrPrintf("Property #3 doesn't match!, line=%d\n",__LINE__);
/* The compare callback should not have been called, as there is no get
* callback for this property */
VERIFY(prop3_cb_info.cmp_count, 0, "H5Pget");
ret = H5Pget(lid1, PROP4_NAME,&prop4_value);
/* Verify the floating-poing value in this way to avoid compiler warning. */
if(!FLT_ABS_EQUAL(prop4_value,*PROP4_DEF_VALUE))
printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n",
HDprintf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n",
"H5Pget", *PROP4_DEF_VALUE, prop4_value, (int)__LINE__, __FILE__);
/* Verify get callback information for properties tracked */
VERIFY(prop1_cb_info.get_count, 1, "H5Pget");
VERIFY(prop1_cb_info.get_plist_id, lid1, "H5Pget");
if(HDstrcmp(prop1_cb_info.get_name, PROP1_NAME)!=0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n",__LINE__);
if(HDmemcmp(prop1_cb_info.get_value, PROP1_DEF_VALUE, PROP1_SIZE)!=0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n",__LINE__);