added stack and test file

This commit is contained in:
Thilo
2025-12-09 17:37:26 +01:00
parent 9363ed22aa
commit 6dc857cc63
2 changed files with 133 additions and 11 deletions
+17 -4
View File
@@ -35,15 +35,28 @@ $(program_obj_filesobj_files): %.o: %.c
# --------------------------
# Unit Tests
# --------------------------
unitTests:
echo "needs to be implemented"
tets_sources = test_stack.c stack.c
test_objects = $(test_sources:.c=.o)
test_runner: $(test_objects)
$(CC) $(FLAGS) $^ -o $@
unitTests: test_runner
@echo "============================="
@echo "Running Stack Unit Tests..."
@echo "============================="
./test_runner
@echo "============================="
@echo "Stack Unit Tests Finished."
@echo "============================="
# --------------------------
# Clean
# --------------------------
clean:
ifeq ($(OS),Windows_NT)
del /f *.o doble
del /f *.o doble test_runner
else
rm -f *.o doble
rm -f *.o doble test_runner
endif