From 2f4cb88d5c60f725323739300bb49dfa8923e7d5 Mon Sep 17 00:00:00 2001 From: Albert Cervin Date: Wed, 2 Nov 2022 22:20:04 +0100 Subject: =?UTF-8?q?=F0=9F=8E=89=20And=20so=20it=20begins?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/assert.h | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 test/assert.h (limited to 'test/assert.h') diff --git a/test/assert.h b/test/assert.h new file mode 100644 index 0000000..8b730b2 --- /dev/null +++ b/test/assert.h @@ -0,0 +1,10 @@ +#include + +#define ASSERT(cond, msg) assert(cond, #cond, __FILE__, __LINE__, msg) +#define ASSERT_STR_EQ(left, right, msg) \ + assert_streq(left, right, __FILE__, __LINE__, msg) + +void assert(bool cond, const char *cond_str, const char *file, int line, + const char *msg); +void assert_streq(const char *left, const char *right, const char *file, + int line, const char *msg); -- cgit v1.2.3