diff options
Diffstat (limited to 'test/tgenprop.c')
-rw-r--r-- | test/tgenprop.c | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/test/tgenprop.c b/test/tgenprop.c index c91a05c..ba60cee 100644 --- a/test/tgenprop.c +++ b/test/tgenprop.c @@ -646,7 +646,11 @@ test_genprop_basic_list(void) VERIFY(prop1_value, *PROP1_DEF_VALUE, "H5Pget"); ret = H5Pget(lid1,PROP2_NAME,&prop2_value); CHECK_I(ret, "H5Pget"); - VERIFY(prop2_value, *PROP2_DEF_VALUE, "H5Pget"); + /* 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", + "H5Pget", *PROP2_DEF_VALUE, prop2_value, (int)__LINE__, __FILE__); + /* Close list */ ret = H5Pclose(lid1); @@ -750,7 +754,11 @@ test_genprop_basic_list_prop(void) VERIFY(prop1_value, *PROP1_DEF_VALUE, "H5Pget"); ret = H5Pget(lid1,PROP2_NAME,&prop2_value); CHECK_I(ret, "H5Pget"); - VERIFY(prop2_value, *PROP2_DEF_VALUE, "H5Pget"); + /* 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", + "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); @@ -759,7 +767,10 @@ test_genprop_basic_list_prop(void) TestErrPrintf("Property #3 doesn't match!, line=%d\n",__LINE__); ret = H5Pget(lid1,PROP4_NAME,&prop4_value); CHECK_I(ret, "H5Pget"); - VERIFY(prop4_value, *PROP4_DEF_VALUE, "H5Pget"); + /* 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", + "H5Pget", *PROP4_DEF_VALUE, prop4_value, (int)__LINE__, __FILE__); /* Delete permanent property */ ret = H5Premove(lid1,PROP2_NAME); @@ -793,7 +804,10 @@ test_genprop_basic_list_prop(void) /* Check values of temporary properties (set with regular values) */ ret = H5Pget(lid1,PROP4_NAME,&prop4_value); CHECK_I(ret, "H5Pget"); - VERIFY(prop4_value, *PROP4_DEF_VALUE, "H5Pget"); + /* 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", + "H5Pget", *PROP4_DEF_VALUE, prop4_value, (int)__LINE__, __FILE__); /* Close list */ ret = H5Pclose(lid1); @@ -1192,7 +1206,10 @@ test_genprop_list_callback(void) VERIFY(prop1_value, *PROP1_DEF_VALUE, "H5Pget"); ret = H5Pget(lid1,PROP2_NAME,&prop2_value); CHECK_I(ret, "H5Pget"); - VERIFY(prop2_value, *PROP2_DEF_VALUE, "H5Pget"); + /* 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", + "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); @@ -1201,7 +1218,10 @@ test_genprop_list_callback(void) TestErrPrintf("Property #3 doesn't match!, line=%d\n",__LINE__); ret = H5Pget(lid1,PROP4_NAME,&prop4_value); CHECK_I(ret, "H5Pget"); - VERIFY(prop4_value, *PROP4_DEF_VALUE, "H5Pget"); + /* 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", + "H5Pget", *PROP4_DEF_VALUE, prop4_value, (int)__LINE__, __FILE__); /* Verify get callback information for properties tracked */ VERIFY(prop1_cb_info.get_count, 1, "H5Pget"); |