Initial import to Tizen
[profile/ivi/sphinxbase.git] / test / unit / test_hash / test_macros.h
1 #include <stdio.h>
2 #include <math.h>
3
4 #define TEST_ASSERT(x) if (!(x)) { fprintf(stderr, "FAIL: %s\n", #x); exit(1); }
5 #define EPSILON 0.001
6 #define TEST_EQUAL(a,b) TEST_ASSERT((a) == (b))
7 #define TEST_EQUAL_FLOAT(a,b) TEST_ASSERT(fabs((a) - (b)) < EPSILON)