diff options
Diffstat (limited to 'unit/include/BH/Unit.h')
| -rw-r--r-- | unit/include/BH/Unit.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/unit/include/BH/Unit.h b/unit/include/BH/Unit.h index 3b3b2b6..c715c23 100644 --- a/unit/include/BH/Unit.h +++ b/unit/include/BH/Unit.h @@ -28,12 +28,20 @@ typedef int (*BH_UnitCallback)(void); if (BH_VERIFY_DELTA < 0.0) \ BH_VERIFY_DELTA = -BH_VERIFY_DELTA; \ if (BH_VERIFY_DELTA > (e)) { \ - printf("%s:%d\t%s (differs by %f)\n", __FILE__, __LINE__, #x " == " #y, BH_VERIFY_DELTA); \ + printf("%s:%d\t%s (differs by %f)\n", \ + __FILE__, __LINE__, #x " == " #y, BH_VERIFY_DELTA); \ return -1; \ } \ } while(0) +#define BH_UNIT_TEST(name) \ + static int unit##name(void) + + +#define BH_UNIT_ADD(name) \ + BH_UnitAdd(#name, unit##name) + /** * Adds unit test \a cb with name \a name for the testing. |
