bintree and tests

This commit is contained in:
DESKTOP-0TGNH6T\alial
2026-06-08 16:45:03 +02:00
parent 4b9366c887
commit ccd912be91
5 changed files with 414 additions and 23 deletions
+20 -5
View File
@@ -26,24 +26,39 @@ doble_initial:
# --------------------------
program_obj_files = stack.o bintree.o numbers.o timer.o highscore.o
doble : main.o $(program_obj_files)
doble: main.o $(program_obj_files)
$(CC) $(FLAGS) $^ -o doble
$(program_obj_files): %.o: %.c
$(CC) -c $(FLAGS) $^ -o $@
main.o: main.c
$(CC) -c $(FLAGS) main.c -o main.o
# --------------------------
# Unit Tests
# --------------------------
unitTests:
echo "needs to be implemented"
bintreeTests: bintree.o stack.o bintreeTests.c $(unityfolder)/unity.c
$(CC) $(FLAGS) -I$(unityfolder) -o runBintreeTests bintreeTests.c bintree.o stack.o $(unityfolder)/unity.c
numbersTests: numbers.o bintree.o stack.o numbersTests.c $(unityfolder)/unity.c
$(CC) $(FLAGS) -I$(unityfolder) -o runNumbersTests numbersTests.c numbers.o bintree.o stack.o $(unityfolder)/unity.c
unitTests: bintreeTests numbersTests
ifeq ($(OS),Windows_NT)
.\runBintreeTests.exe
.\runNumbersTests.exe
else
./runBintreeTests
./runNumbersTests
endif
# --------------------------
# Clean
# --------------------------
clean:
ifeq ($(OS),Windows_NT)
del /f *.o doble
del /f *.o *.exe
else
rm -f *.o doble
rm -f *.o doble doble_initial runBintreeTests runNumbersTests
endif