From 244fa85e98fa6f325025f49aca6e1fbb1e440582 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 13 Nov 2019 16:48:03 -0500 Subject: Decouple main program and add initial tests --- test/myassert.h | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 test/myassert.h (limited to 'test/myassert.h') diff --git a/test/myassert.h b/test/myassert.h new file mode 100644 index 0000000..01e567e --- /dev/null +++ b/test/myassert.h @@ -0,0 +1,11 @@ +#define myassert(message, condition) \ + do { \ + if (!(condition)) { \ + fprintf(stderr, "%s:%d:%s :: %s\n", \ + __FILE__, \ + __LINE__, \ + __FUNCTION__, \ + message); \ + return 1; \ + } \ + } while (0); -- cgit