fix(test): compilation and deps

This commit is contained in:
lohhiiccc 2026-03-02 10:04:24 +01:00
parent ad4df3a580
commit 7304ec95f3
2 changed files with 8 additions and 3 deletions

View file

@ -114,10 +114,11 @@ else
endif
@echo "[OK] All tests passed"
$(TEST_BIN): $(TESTS) $(filter-out $(OBJ_DIR)/main.o,$(OBJS)) $(LIBICMP_DEP)
$(TEST_BIN): $(VERSION_HEADER) $(TESTS) $(filter-out $(OBJ_DIR)/main.o,$(OBJS)) $(LIBICMP_DEP)
@mkdir -p $(dir $@)
@echo "[BUILD] Building test binary..."
$(CC) $(CPPFLAGS) $(CFLAGS) $^ $(LDFLAGS) $(TEST_LDFLAGS) -o $@
$(CC) $(CPPFLAGS) $(CFLAGS) $(filter-out $(VERSION_HEADER),$^) $(LDFLAGS) $(TEST_LDFLAGS) -o $@
else
test:
@echo "[SKIP] Tests are disabled"

View file

@ -1,6 +1,10 @@
#include <criterion/criterion.h>
#include "version_gen.h"
t_prog_name g_prog_name = { NULL, NULL };
Test(dummy, always_pass)
{
cr_assert(0, "Hello, world!");
cr_assert(1, "Hello, world!");
}