summaryrefslogtreecommitdiff
path: root/TestMakefile
diff options
context:
space:
mode:
authorGloria Mundi <gloria@gloria-mundi.eu>2024-05-01 21:25:26 +0200
committerGloria Mundi <gloria@gloria-mundi.eu>2024-05-01 21:25:26 +0200
commite0beaa56b648367bc52dc8c7d44162ac1c8b45fe (patch)
tree8320be6afe8953e1cf4cc98b00ba87e1ba66e58a /TestMakefile
parent5e012c297016f928260b9a4cb00b24de2d415df9 (diff)
slightly simplify lazy propagation and add tests
Diffstat (limited to 'TestMakefile')
-rw-r--r--TestMakefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/TestMakefile b/TestMakefile
index ca1b2f8..5c46856 100644
--- a/TestMakefile
+++ b/TestMakefile
@@ -8,6 +8,8 @@ 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/fenwickTree \
datastructures/test/fenwickTree2 \
datastructures/test/monotonicConvexHull \
@@ -20,7 +22,8 @@ TESTS := \
# Dependencies which must be present before generating the .d file.
PREDEPS := \
- datastructures/test/segmentTree=datastructures/test/segmentTree.tmp.cpp
+ 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
@@ -45,6 +48,9 @@ cleantest:
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)