Modify messages of tc macros defined in tc_common.h
@@ -46,7 +46,7 @@ int total_fail;
#define TC_ASSERT_EQ_CLEANUP(api_name, var, ref, error, freeResource) \
{\
if ((var) != (ref)) {\
- printf("\n[%s][Line : %d] FAIL, %s : API error returned = %s [%d] ", __func__, __LINE__, api_name, error, #var); \
+ printf("\n[%s][Line : %d] FAIL, %s : API error returned = %s, (%s == 0x%x) and (%s == 0x%x) are not equal\n", __func__, __LINE__, api_name, error, #var, (int)(var), #ref, (int)(ref)); \
total_fail++; \
freeResource; \
return; \
@@ -65,7 +65,7 @@ int total_fail;
#define TC_ASSERT_NEQ_CLEANUP(api_name, var, ref, error, freeResource) \
{\
if ((var) == (ref)) {\
- printf("\n[%s][Line : %d] FAIL, %s : API error returned = %s [%d] ", __func__, __LINE__, api_name, error, #var); \
+ printf("\n[%s][Line : %d] FAIL, %s : API error returned = %s, (%s == 0x%x) and (%s == 0x%x) are equal\n", __func__, __LINE__, api_name, error, #var, (int)(var), #ref, (int)(ref)); \
total_fail++; \
freeResource; \
return; \
@@ -84,7 +84,7 @@ int total_fail;
#define TC_ASSERT_GT_CLEANUP(api_name, var, ref, error, freeResource) \
{\
if ((var) <= (ref)) {\
- printf("\n[%s][Line : %d] FAIL, %s : Values (%s == 0x%x) is not greater than (%s == 0x%x)\n", __func__, __LINE__, api_name, error, #var); \
+ printf("\n[%s][Line : %d] FAIL, %s : API error returned = %s, (%s == 0x%x) is not greater than (%s == 0x%x)\n", __func__, __LINE__, api_name, error, #var, (int)(var), #ref, (int)(ref)); \
total_fail++; \
freeResource; \
return; \
@@ -103,7 +103,7 @@ int total_fail;
#define TC_ASSERT_GEQ_CLEANUP(api_name, var, ref, error, freeResource) \
{\
if ((var) < (ref)) {\
- printf("\n[%s][Line : %d] FAIL, %s : Values (%s == 0x%x) is not greater than or euqal to (%s == 0x%x)\n", __func__, __LINE__, api_name, error, #var); \
+ printf("\n[%s][Line : %d] FAIL, %s : API error returned = %s, (%s == 0x%x) is not greater than or equal to (%s == 0x%x)\n", __func__, __LINE__, api_name, error, #var, (int)(var), #ref, (int)(ref)); \
total_fail++; \
freeResource; \
return; \
