From 7304ec95f3022c9f047ca0f4c6d2675b0b9b9094 Mon Sep 17 00:00:00 2001 From: lohhiiccc <96543753+lohhiiccc@users.noreply.github.com> Date: Mon, 2 Mar 2026 10:04:24 +0100 Subject: [PATCH] fix(test): compilation and deps --- Makefile | 5 +++-- tests/test_main.c | 6 +++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 152dcf2..b17a3d7 100644 --- a/Makefile +++ b/Makefile @@ -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" diff --git a/tests/test_main.c b/tests/test_main.c index 352559c..bd95ba1 100644 --- a/tests/test_main.c +++ b/tests/test_main.c @@ -1,6 +1,10 @@ #include +#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!"); } +