feat: add assertion test (commented)
This commit is contained in:
@@ -0,0 +1,33 @@
|
|||||||
|
#include "tests.h"
|
||||||
|
|
||||||
|
#include <seallib/assert.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
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
|
||||||
Reference in New Issue
Block a user