diff options
| author | Gloria Mundi <gloria@gloria-mundi.eu> | 2024-05-01 18:07:15 +0200 |
|---|---|---|
| committer | Gloria Mundi <gloria@gloria-mundi.eu> | 2024-05-01 18:07:15 +0200 |
| commit | a24ce98f2c79d5594d171a9b294b1cf25b488ebc (patch) | |
| tree | b7f672a8a027bee24c8b926a083560ce8ac9b1ed /Makefile | |
| parent | 2d09c91b8e3a4482ed94fab44ec1aab42ab72da9 (diff) | |
improve test system, fix segment tree, add more segment tree tests
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 56 |
1 files changed, 3 insertions, 53 deletions
@@ -1,15 +1,3 @@ -TESTS = \ - datastructures/test/segmentTree.test \ - datastructures/test/segmentTree2.test \ - datastructures/test/fenwickTree.test \ - datastructures/test/fenwickTree2.test \ - datastructures/test/monotonicConvexHull.test \ - datastructures/test/persistent.test \ - datastructures/test/sparseTable.test \ - datastructures/test/sparseTableDisjoint.test \ - graph/test/binary_lifting.test \ - graph/test/LCA_sparse.test \ - math/test/binomial0.test LATEXMK = latexmk -interaction=nonstopmode @@ -23,7 +11,8 @@ tcr-opt.pdf: FORCE all: pdf test -test: $(TESTS:.test=.ok) +test: + +gmake -f TestMakefile clean: cleanpdf cleantest @@ -33,46 +22,7 @@ cleanpdf: rm -f *.thm cleantest: - rm -f $(TESTS) $(TESTS:.test=.ok) \ - datastructures/test/segmentTree.tmp.cpp \ - datastructures/test/segmentTree2.tmp.cpp - -%.ok: %.test - timeout -v 1 ./$< - @touch $@ -%.test: %.cpp test.h - g++ -include test.h -std=gnu++20 -Wall -Wextra -Wpedantic -Werror \ - -fsanitize=address,undefined -g -o $@ $< - -datastructures/test/segmentTree.test: datastructures/test/segmentTree.cpp \ - datastructures/test/segmentTree.tmp.cpp -datastructures/test/segmentTree.tmp.cpp: datastructures/segmentTree.cpp - { sed -e '/OR/,$$d' $< ; echo '};' ; } > $@ -datastructures/test/segmentTree2.test: datastructures/test/segmentTree2.cpp \ - datastructures/test/segmentTree2.tmp.cpp -datastructures/test/segmentTree2.tmp.cpp: datastructures/segmentTree.cpp - sed -e '/void update/,/OR/d' \ - -e '/remove for range/,/}}/{/}}/!d;s/}}/}/}' $< > $@ -datastructures/test/fenwickTree.test: datastructures/test/fenwickTree.cpp \ - datastructures/fenwickTree.cpp -datastructures/test/fenwickTree2.test: datastructures/test/fenwickTree2.cpp \ - datastructures/fenwickTree2.cpp -datastructures/test/monotonicConvexHull.test: \ - datastructures/test/monotonicConvexHull.cpp \ - datastructures/monotonicConvexHull.cpp -datastructures/test/persistent.test: datastructures/test/persistent.cpp \ - datastructures/persistent.cpp -datastructures/test/sparseTable.test: datastructures/test/sparseTable.cpp \ - datastructures/sparseTable.cpp -datastructures/test/sparseTableDisjoint.test: \ - datastructures/test/sparseTableDisjoint.cpp \ - datastructures/sparseTableDisjoint.cpp -graph/test/binary_lifting.test: graph/test/binary_lifting.cpp \ - graph/binary_lifting.cpp graph/test/util.cpp -graph/test/LCA_sparse.test: graph/test/LCA_sparse.cpp \ - graph/LCA_sparse.cpp datastructures/sparseTable.cpp graph/test/util.cpp -math/test/binomial0.test: math/test/binomial0.cpp math/binomial0.cpp \ - math/shortModInv.cpp + +-gmake -f TestMakefile cleantest FORCE: .PHONY: all pdf test clean cleanpdf cleantest FORCE |
