Go to the documentation of this file.
45 #define QA_ASSERT_TRUE( message, flag ) \
48 printf( "%s:%d - ERROR - %s\n", __FILE__, __LINE__, message ); \
55 #define QA_ASSERT_EQUALS( message, expected, actual ) \
56 if( ((expected) != (actual)) ) \
58 printf( "%s:%d - ERROR - %s, expected %d, got %d\n", __FILE__, __LINE__, message, expected, actual ); \
64 #define QA_ASSERT_CLOSE( message, expected, actual, tolerance ) \
65 if (fabs((expected)-(actual))>(tolerance)) \
67 printf( "%s:%d - ERROR - %s, expected %f, got %f, tol=%f\n", __FILE__, __LINE__, message, ((double)(expected)), ((double)(actual)), ((double)(tolerance)) ); \
73 #define QA_ASSERT_CLOSE_INT( message, expected, actual, tolerance ) \
74 if (abs((expected)-(actual))>(tolerance)) \
76 printf( "%s:%d - ERROR - %s, expected %d, got %d, tol=%d\n", __FILE__, __LINE__, message, ((int)(expected)), ((int)(actual)), ((int)(tolerance)) ); \
int g_testsPassed
Definition: paqa.c:54
int g_testsFailed
Definition: paqa.c:55