Skip to content

Commit

Permalink
Add custom none-abort assert called tassert
Browse files Browse the repository at this point in the history
tassert is (test assert)
  • Loading branch information
JakeRoggenbuck committed Jun 22, 2024
1 parent 0ac0faa commit d417078
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/testing/tassert.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <assert.h>

// TODO: Make custom assert that does not call quit
#define tassert(e) assert(e)
#define tassert(e) ((void)((e) ? 0 : __assert(#e, __FILE__, __LINE__)))
#define __assert(e, file, line) \
((void)printf("%s:%u: failed assertion `%s'\n", file, line, e), 0)

0 comments on commit d417078

Please sign in to comment.