diff options
| author | Alexander Pickering <alexandermpickering@gmail.com> | 2018-01-05 20:07:03 -0500 |
|---|---|---|
| committer | Alexander Pickering <alexandermpickering@gmail.com> | 2018-01-05 20:07:03 -0500 |
| commit | 59c84b0460418983b0e655fd9fbba34e19b10291 (patch) | |
| tree | 21dce8b7a1f6c3f4e2eaab3180866f609c5d56d5 /Makefile | |
| parent | 9c7882627fd28c060f53d86e194fb864302a347c (diff) | |
| download | libctemplates-59c84b0460418983b0e655fd9fbba34e19b10291.tar.gz libctemplates-59c84b0460418983b0e655fd9fbba34e19b10291.tar.bz2 libctemplates-59c84b0460418983b0e655fd9fbba34e19b10291.zip | |
Started writing unit tests
Added some tests for good input.
Also fixed a bug where an empty loop would crash.
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -1,6 +1,10 @@ -CFLAGS = -I. -L. -std=c99 -pedantic -Wall -Werror -O3 +CFLAGS = -I. -L. -std=c99 -pedantic -Wall -Werror -O3 -g CC = gcc LIBNAME = libctemplates.a +BIN_POSTFIX = .exe + + +TEST_1_NAME = t\test_1$(BIN_POSTFIX) $(LIBNAME): ctemplates.o fbuf.o kmp.o hashmap.o ar rc $(LIBNAME) ctemplates.o fbuf.o kmp.o hashmap.o @@ -21,8 +25,11 @@ hashmap.o: hashmap.c hashmap.h clean: rm -f *.o *.a template -test: - cd t; ./test.sh +$(TEST_1_NAME): t\test_1.c $(LIBNAME) + $(CC) $(CFLAGS) -o t\test_1.exe t\test_1.c -lctemplates + +test: $(TEST_1_NAME) + $(TEST_1_NAME) install: $(LIBNAME) cp $(LIBNAME) /usr/local/lib |
