diff options
| author | Albert Cervin <albert@acervin.com> | 2022-11-02 22:20:04 +0100 |
|---|---|---|
| committer | Albert Cervin <albert@acervin.com> | 2022-11-16 23:33:49 +0100 |
| commit | 2f4cb88d5c60f725323739300bb49dfa8923e7d5 (patch) | |
| tree | 6ec22c2be92eff05f18e5919e747faab56e555ad /test/assert.h | |
| download | dged-2f4cb88d5c60f725323739300bb49dfa8923e7d5.tar.gz dged-2f4cb88d5c60f725323739300bb49dfa8923e7d5.tar.xz dged-2f4cb88d5c60f725323739300bb49dfa8923e7d5.zip | |
🎉 And so it begins
Diffstat (limited to 'test/assert.h')
| -rw-r--r-- | test/assert.h | 10 |
1 files changed, 10 insertions, 0 deletions
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 <stdbool.h> + +#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); |
