Add const qualifier in assert_cmp()

This commit is contained in:
Yinan Zhang 2020-02-05 15:33:31 -08:00 committed by Qi Wang
parent ba0e35411c
commit bc05ecebf6

View File

@ -1,8 +1,8 @@
#define ASSERT_BUFSIZE 256
#define assert_cmp(t, a, b, cmp, neg_cmp, pri, ...) do { \
t a_ = (a); \
t b_ = (b); \
const t a_ = (a); \
const t b_ = (b); \
if (!(a_ cmp b_)) { \
char prefix[ASSERT_BUFSIZE]; \
char message[ASSERT_BUFSIZE]; \