mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[quiz] Make a special assert for tests (which really assert even if DEBUG=0)
This commit is contained in:
@@ -10,7 +10,7 @@ $(symbols_file): $(tests)
|
|||||||
@echo "AWK $@"
|
@echo "AWK $@"
|
||||||
$(Q) awk -f quiz/src/symbols.awk $(tests) > $@
|
$(Q) awk -f quiz/src/symbols.awk $(tests) > $@
|
||||||
|
|
||||||
runner_objs += $(addprefix quiz/src/, runner.o symbols.o i18n.o)
|
runner_objs += $(addprefix quiz/src/, runner.o assertions.o symbols.o i18n.o)
|
||||||
test_objs += $(subst .c,.o, $(subst .cpp,.o,$(tests)))
|
test_objs += $(subst .c,.o, $(subst .cpp,.o,$(tests)))
|
||||||
|
|
||||||
test.$(EXE): $(runner_objs) $(test_objs)
|
test.$(EXE): $(runner_objs) $(test_objs)
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void quiz_assert_true(bool condition);
|
void quiz_assert(bool condition);
|
||||||
void quiz_print(const char * message);
|
void quiz_print(const char * message);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
#include <ion.h>
|
#include <ion.h>
|
||||||
#include <quiz.h>
|
#include <quiz.h>
|
||||||
|
|
||||||
void quiz_assert_true(bool condition) {
|
void quiz_assert(bool condition) {
|
||||||
if (!condition) {
|
if (!condition) {
|
||||||
|
abort();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user