cOMS/utils/TestUtils.h
Dennis Eichhorn 20770b42a4
Some checks are pending
CodeQL / Analyze (${{ matrix.language }}) (autobuild, c-cpp) (push) Waiting to run
Microsoft C++ Code Analysis / Analyze (push) Waiting to run
update
2025-04-14 07:12:31 +00:00

27 lines
579 B
C
Executable File

/**
* Jingga
*
* @copyright Jingga
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
#ifndef COMS_UTILS_TEST_UTILS_H
#define COMS_UTILS_TEST_UTILS_H
#if DEBUG
#define ASSERT_SIMPLE(a) if (!(a)) { \
/* cppcheck-suppress nullPointer */ \
*(volatile int *)0 = 0; \
}
#define ASSERT_SIMPLE_CONST(a) if constexpr (!(a)) { \
/* cppcheck-suppress nullPointer */ \
*(volatile int *)0 = 0; \
}
#else
#define ASSERT_SIMPLE(a) ((void)0)
#define ASSERT_SIMPLE_CONST(a) ((void)0)
#endif
#endif