X-Git-Url: https://mattmccutchen.net/bigint/bigint.git/blobdiff_plain/0afe80d551aa9b66b574b956cf681692399fc728..e6866cd00f91dd02fb54942d61fb1586ce0ed5b5:/Makefile diff --git a/Makefile b/Makefile index 68e7a00..aa81d4a 100644 --- a/Makefile +++ b/Makefile @@ -27,23 +27,18 @@ library: $(library-objects) # Conservatively assume that all the objects depend on all the headers. $(library-objects): $(library-headers) -# TESTSUITE +# TESTSUITE (NOTE: Currently expects a 32-bit system) # Compiling the testsuite. testsuite.o: $(library-headers) testsuite: testsuite.o $(library-objects) g++ $^ -o $@ # Extract the expected output from the testsuite source. testsuite.expected: testsuite.cc - sed -nre 's,^.*//,,p' $< >$@ + nl -ba -p -s: $< | sed -nre 's,^ +([0-9]+):.*//([^ ]),Line \1: \2,p' >$@ # Run the testsuite. .PHONY: test test: testsuite testsuite.expected - ./testsuite >testsuite.out - @if diff -u testsuite.expected testsuite.out; then\ - echo 'All tests passed.';\ - else\ - echo >&2 'At least one test failed!'; exit 1;\ - fi + ./run-testsuite # The rules below build a program that uses the library. They are preset to # build ``sample'' from ``sample.cc''. You can change the name(s) of the