summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/Makefile12
-rw-r--r--test/stattest.cc10
2 files changed, 14 insertions, 8 deletions
diff --git a/test/Makefile b/test/Makefile
index bf4200ba3..15019a1f5 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -2,18 +2,24 @@
CC?= gcc
CXX?= g++
+PYTHON?=/usr/bin/env python
CURDIR?= $(shell /bin/pwd)
-SRCDIR?= ..
+SRCDIR?= $(CURDIR)/..
CCFLAGS= -g -O0 -MMD -I. -I$(SRCDIR) -I- -DTRACING_ON=0
MYSQL= -I/usr/include/mysql -L/usr/lib/mysql -lmysqlclient
-VPATH=$(SRCDIR)
+VPATH=$(SRCDIR):$(CURDIR)
default:
@echo "You must specify a target"
+base/traceflags.cc base/traceflags.hh: $(SRCDIR)/base/traceflags.py
+ mkdir -p base; \
+ cd base; \
+ $(PYTHON) $<
+
bitvectest: test/bitvectest.cc
$(CXX) $(CCFLAGS) -o $@ $^
@@ -61,5 +67,5 @@ tracetest: $(TRACE)
$(CXX) $(CCFLAGS) -o $@ $^
clean:
- @rm -f *test *~ .#* *.core core
+ @rm -rf *test *~ .#* *.core core base
.PHONY: clean
diff --git a/test/stattest.cc b/test/stattest.cc
index 7bf355c0e..9b7ba9857 100644
--- a/test/stattest.cc
+++ b/test/stattest.cc
@@ -66,8 +66,8 @@ Vector2d<> s16;
Formula f1;
Formula f2;
Formula f3;
-Formula f4;
-Formula f5;
+Value f4;
+Value f5;
Formula f6;
Formula f7;
@@ -279,11 +279,14 @@ main(int argc, char *argv[])
;
f4
+ .functor(testfunc)
.name("Formula4")
.desc("this is formula 4")
;
+ TestClass testclass;
f5
+ .functor(testclass)
.name("Formula5")
.desc("this is formula 5")
;
@@ -296,9 +299,6 @@ main(int argc, char *argv[])
f1 = s1 + s2;
f2 = (-s1) / (-s2) * (-s3 + ULL(100) + s4);
f3 = sum(s5) * s7;
- f4 = functor(testfunc);
- TestClass testclass;
- f5 = functor(testclass);
f6 += constant(10.0);
f6 += s5[3];
f7 = constant(1);