Add some tests
This commit is contained in:
@@ -9,23 +9,39 @@
|
||||
#include "debug/debug.h"
|
||||
|
||||
#ifndef ASSERTIONS_FAKED
|
||||
void assertTrueImpl(
|
||||
const char *file,
|
||||
const int32_t line,
|
||||
const bool x,
|
||||
const char *message
|
||||
) {
|
||||
if(x != true) {
|
||||
debugPrint(
|
||||
"Assertion Failed in %s:%i\n\n%s\n",
|
||||
#ifdef DUSK_TEST_ASSERT
|
||||
void assertTrueImpl(
|
||||
const char *file,
|
||||
const int32_t line,
|
||||
const bool x,
|
||||
const char *message
|
||||
) {
|
||||
mock_assert(
|
||||
x == true,
|
||||
message,
|
||||
file,
|
||||
line,
|
||||
message
|
||||
line
|
||||
);
|
||||
|
||||
abort();
|
||||
}
|
||||
}
|
||||
#else
|
||||
void assertTrueImpl(
|
||||
const char *file,
|
||||
const int32_t line,
|
||||
const bool x,
|
||||
const char *message
|
||||
) {
|
||||
if(x != true) {
|
||||
debugPrint(
|
||||
"Assertion Failed in %s:%i\n\n%s\n",
|
||||
file,
|
||||
line,
|
||||
message
|
||||
);
|
||||
|
||||
abort();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void assertFalseImpl(
|
||||
const char *file,
|
||||
|
||||
Reference in New Issue
Block a user