From 7d993fbc3d1b3774435379405c8ed68962634135 Mon Sep 17 00:00:00 2001 From: neru Date: Thu, 21 May 2026 13:09:36 -0300 Subject: [PATCH] feat: add assertion test (commented) --- src/test/tests/assert.cpp | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 src/test/tests/assert.cpp diff --git a/src/test/tests/assert.cpp b/src/test/tests/assert.cpp new file mode 100644 index 0000000..4a46e4a --- /dev/null +++ b/src/test/tests/assert.cpp @@ -0,0 +1,33 @@ +#include "tests.h" + +#include + +/* + commented out for obvious reasons +*/ +#if 0 + +class AssertTest : ITest +{ + public: + AssertTest() : ITest() {}; + + virtual void run() override + { + int a = 2; + int b = 5; + + logInfo("trying true assertions"); + ASSERT(a * b == 10, "Invalid assertion"); + ASSERT(true, "Invalid assertion"); + + logInfo("trying false assertion"); + ASSERT(false, "Valid assertion"); + ASSERT(a * b == a, "Valid assertion"); + } + + virtual const char* getName() override { return "Assertion test"; } +}; + +static AssertTest g_assertTest; +#endif