zynaddsubfx

ZynAddSubFX open source synthesizer
Log | Files | Refs | Submodules | LICENSE

test-suite.h (652B)


      1 #include "common.h"
      2 
      3 #define TS_ASSERT(b) \
      4     assert_true(b, #b, __LINE__)
      5 
      6 #define TS_ASSERT_DELTA(a,b,t) \
      7     assert_f32_sim(a,b,t,"similar floats", __LINE__)
      8 
      9 #define TS_ASSERT_EQUAL_STR(a,b) \
     10     assert_str_eq(a,b,a " == " #b, __LINE__)
     11 
     12 #define TS_ASSERT_EQUAL_CPP(a,b) \
     13     assert_true(a == b,"equality check", __LINE__)
     14 
     15 #define TS_ASSERT_EQUAL_INT(a,b) \
     16     assert_int_eq(a,b,"similar ints", __LINE__)
     17 
     18 #define TS_ASSERT_EQUAL_FLT(a,b) \
     19     assert_f32_eq(a,b,"similar ints", __LINE__)
     20 #define TS_NON_NULL(a) \
     21     assert_non_null(a, "valid pointer", __LINE__)
     22 
     23 #define RUN_TEST(x) \
     24     test.setUp();\
     25     test.x();\
     26     test.tearDown()