summaryrefslogtreecommitdiff
path: root/test/Makefile
diff options
context:
space:
mode:
authorDavid Phillips <david@sighup.nz>2017-12-28 19:58:57 +1300
committerDavid Phillips <david@sighup.nz>2017-12-28 20:23:38 +1300
commit7823d9c7e4f3c0485e8d96e44e0d94541762c6d1 (patch)
tree38588863cbdfc5752bc9d6473f6809fc478bda97 /test/Makefile
parent12fc1ad7e759715a11776298f6da6d946d75bbd1 (diff)
downloadhence-7823d9c7e4f3c0485e8d96e44e0d94541762c6d1.tar.xz
Move logic tests to test framework
Diffstat (limited to 'test/Makefile')
-rw-r--r--test/Makefile18
1 files changed, 15 insertions, 3 deletions
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: