pan/bi: Add BIT_ASSERT helper for unit testing
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12109>
This commit is contained in:
parent
9358d1fca6
commit
ca36943466
|
@ -84,4 +84,13 @@ bit_instr_equal(bi_instr *A, bi_instr *B)
|
|||
} \
|
||||
} while(0)
|
||||
|
||||
#define BIT_ASSERT(condition) do { \
|
||||
if (condition) { \
|
||||
nr_pass++; \
|
||||
} else { \
|
||||
fprintf(stderr, "Assertion failed: %s\n", #condition); \
|
||||
nr_fail++; \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue