X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libtest%2Ferror.h;h=7e34227620552cf291799b873dfc0195699948cd;hb=3f612b4f5074c64e5a0b63dd38d273b40a473620;hp=e24c1791fe1976f6217c279be3e8527bfe42a60b;hpb=0ccec3ba6ce515f61e5d0b3c0a07220646c85e40;p=m6w6%2Flibmemcached diff --git a/libtest/error.h b/libtest/error.h index e24c1791..7e342276 100644 --- a/libtest/error.h +++ b/libtest/error.h @@ -25,11 +25,16 @@ enum test_return_t { TEST_SUCCESS, TEST_FAILURE, - TEST_MEMORY_ALLOCATION_FAILURE, - TEST_SKIPPED, - TEST_FATAL // Collection should not be continued + TEST_SKIPPED }; -#define test_failed(__test_return_t) ((__test_return_t) != TEST_SUCCESS) -#define test_success(__test_return_t) ((__test_return_t) == TEST_SUCCESS) +static inline bool test_success(test_return_t rc) +{ + return (rc == TEST_SUCCESS); +} + +static inline bool test_failed(test_return_t rc) +{ + return (rc != TEST_SUCCESS); +}