diff options
Diffstat (limited to 'meowpp_unittest/debug')
-rw-r--r-- | meowpp_unittest/debug/assert.debug.cpp | 21 | ||||
-rw-r--r-- | meowpp_unittest/debug/assert.nodebug.cpp | 22 |
2 files changed, 43 insertions, 0 deletions
diff --git a/meowpp_unittest/debug/assert.debug.cpp b/meowpp_unittest/debug/assert.debug.cpp new file mode 100644 index 0000000..7514c4c --- /dev/null +++ b/meowpp_unittest/debug/assert.debug.cpp @@ -0,0 +1,21 @@ +#include <cstdio> + +#define MEOWPP_DEBUG_ASSERT_TESTING + +namespace test { + +void abort() { + printf("Do abort()\n"); +} + +} + +#include <meowpp/debug/assert.h> + +using namespace meow; + +int main() { + Assert(1 == 1, "hi"); + Assert(1 == 0, "no!!!%s %d", "bla", 13); + return 0; +} diff --git a/meowpp_unittest/debug/assert.nodebug.cpp b/meowpp_unittest/debug/assert.nodebug.cpp new file mode 100644 index 0000000..588b874 --- /dev/null +++ b/meowpp_unittest/debug/assert.nodebug.cpp @@ -0,0 +1,22 @@ +#include <cstdio> + +#define MEOWPP_NODEBUG + +#define MEOWPP_TESTING + +namespace test { + +void abort() { + printf("Do abort()\n"); +} + +} +#include <meowpp/debug/assert.h> + +using namespace meow; + +int main() { + Assert(1 == 1, "hi"); + Assert(1 == 0, "no!!!%s %d", "bla", 13); + return 0; +} |