test: add ASSERT_OK (#3957)
The majority of uses for ASSERT_EQ are to check if the return value is 0. So make a macro specifically for this and make things easier to read.
This commit is contained in:
parent
4fc331f8e8
commit
b60f08e782
@ -198,6 +198,7 @@ typedef enum {
|
||||
#define ASSERT_LE(a, b) ASSERT_BASE(a, <=, b, int64_t, PRId64)
|
||||
#define ASSERT_LT(a, b) ASSERT_BASE(a, <, b, int64_t, PRId64)
|
||||
#define ASSERT_NE(a, b) ASSERT_BASE(a, !=, b, int64_t, PRId64)
|
||||
#define ASSERT_OK(a) ASSERT_BASE(a, ==, 0, int64_t, PRId64)
|
||||
|
||||
#define ASSERT_UINT64_EQ(a, b) ASSERT_BASE(a, ==, b, uint64_t, PRIu64)
|
||||
#define ASSERT_UINT64_GE(a, b) ASSERT_BASE(a, >=, b, uint64_t, PRIu64)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user