[quiz] Make a special assert for tests (which really assert even if DEBUG=0)

This commit is contained in:
Émilie Feral
2018-08-28 10:39:43 +02:00
parent e746061b91
commit d3296be915
3 changed files with 4 additions and 3 deletions

View File

@@ -10,7 +10,7 @@ $(symbols_file): $(tests)
@echo "AWK $@"
$(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.$(EXE): $(runner_objs) $(test_objs)

View File

@@ -13,7 +13,7 @@
extern "C" {
#endif
void quiz_assert_true(bool condition);
void quiz_assert(bool condition);
void quiz_print(const char * message);
#ifdef __cplusplus

View File

@@ -1,7 +1,8 @@
#include <ion.h>
#include <quiz.h>
void quiz_assert_true(bool condition) {
void quiz_assert(bool condition) {
if (!condition) {
abort();
}
}