From 7823d9c7e4f3c0485e8d96e44e0d94541762c6d1 Mon Sep 17 00:00:00 2001 From: David Phillips Date: Thu, 28 Dec 2017 19:58:57 +1300 Subject: Move logic tests to test framework --- test/Makefile | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'test/Makefile') diff --git a/test/Makefile b/test/Makefile index 25c1690..053552f 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,14 +1,26 @@ CFLAGS += -I../ TESTS = \ - test-whitespace-input + test-whitespace-input \ + test-logic-and \ + test-logic-or \ + test-logic-nand \ + test-logic-nor \ + test-logic-xor \ + test-logic-not \ -all: clean $(TESTS) -test-whitespace-input: ../gate.o ../parser.o ../logic.o +all: $(TESTS) +test-%: test-%.c ../gate.o ../parser.o ../logic.o + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ + +.PHONY: clean clean: rm -f $(TESTS) + for i in $(TESTS) ; do \ + rm -f $$i.std{out,err}.log ; \ + done .PHONY: test test: -- cgit v1.1