diff options
Diffstat (limited to 'TestMakefile')
| -rw-r--r-- | TestMakefile | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/TestMakefile b/TestMakefile deleted file mode 100644 index 58d2678..0000000 --- a/TestMakefile +++ /dev/null @@ -1,61 +0,0 @@ -with-defines-subsets = $(if $2,$(call with-defines-subsets,$1,$(call dropfirst,$2)) $(call with-defines-subsets,$1.$(firstword $2),$(call dropfirst,$2)),$1) -dropfirst = $(wordlist 2,$(words $1),$1) - -source = $(dir $*)$(firstword $(subst ., ,$(notdir $*))) -flags = $(call dropfirst,$(subst ., -D,$(notdir $*))) $(CPPFLAGS) -predep = $(patsubst $(source)=%,%,$(filter $(source)=%,$(PREDEPS))) - -TESTS := \ - $(call with-defines-subsets,datastructures/test/segmentTree,SEGTREE_MUL SEGTREE_INIT_DEFAULT SEGTREE_RANGE_UPDATE) \ - $(call with-defines-subsets,datastructures/test/segmentTree.SEGTREE_FIRST_NEG,SEGTREE_INIT_DEFAULT) \ - $(call with-defines-subsets,datastructures/test/lazyPropagation,SEGTREE_FIRST_NEG SEGTREE_INIT_DEFAULT) \ - $(call with-defines-subsets,datastructures/test/lazyPropagation.SEGTREE_MAX,SEGTREE_INIT_DEFAULT) \ - datastructures/test/waveletTree \ - datastructures/test/fenwickTree \ - datastructures/test/fenwickTree2 \ - datastructures/test/treap2 \ - datastructures/test/sparseTable \ - datastructures/test/sparseTableDisjoint \ - datastructures/test/monotonicConvexHull \ - datastructures/test/persistent \ - graph/test/binary_lifting \ - graph/test/LCA_sparse \ - math/test/binomial0 - -# Dependencies which must be present before generating the .d file. -PREDEPS := \ - datastructures/test/segmentTree=datastructures/test/segmentTree.tmp.cpp \ - datastructures/test/lazyPropagation=datastructures/test/lazyPropagation.tmp.cpp - -CPPFLAGS := -include test.h -std=gnu++20 -Wall -Wextra \ - -Werror -fsanitize=address,undefined -fno-sanitize-recover -g - -test: $(TESTS:=.ok) - -cleantest: - rm -f $(TESTS:=.test) $(TESTS:=.ok) $(TESTS:=.d) \ - datastructures/test/segmentTree.tmp.cpp - -%.ok: %.test - timeout -v 2 ./$< - @touch $@ - -.SECONDEXPANSION: -%.test: $$(source).cpp - g++ $(flags) -o $@ $< - -%.d: $$(source).cpp $$(predep) - g++ -MM -MT '$*.test $*.d' -MF '$@' $(flags) $< - -datastructures/test/segmentTree.tmp.cpp: datastructures/segmentTree.cpp \ - datastructures/test/segmentTree.awk - awk -f datastructures/test/segmentTree.awk $< > $@ -datastructures/test/lazyPropagation.tmp.cpp: \ - datastructures/lazyPropagation.cpp datastructures/test/lazyPropagation.awk - awk -f datastructures/test/lazyPropagation.awk $< > $@ - -.PHONY: test cleantest -.SECONDARY: $(TESTS:=.test) - -include $(TESTS:=.d) - |
