summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/Makefile.am24
-rw-r--r--test/regress/Makefile.am3
-rw-r--r--test/regress/bug1.cvc11
-rw-r--r--test/unit/Makefile.am36
-rw-r--r--test/unit/expr/expr_black.h (renamed from test/expr/expr_black.h)0
-rw-r--r--test/unit/expr/expr_white.h (renamed from test/expr/expr_white.h)0
6 files changed, 51 insertions, 23 deletions
diff --git a/test/Makefile.am b/test/Makefile.am
index bf74eaa47..ff449f768 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1,23 +1 @@
-if HAVE_CXXTESTGEN
-
-AM_CPPFLAGS = -I. "-I$(CXXTEST)" "-I@top_srcdir@/src/include" "-I@top_srcdir@/src"
-AM_CXXFLAGS = -fno-access-control
-AM_LDFLAGS = -L@top_builddir@/src/libcvc4.a
-TESTS = \
- expr/expr_black \
- expr/expr_white
-
-%.cpp: %.h
- $(CXXTESTGEN) --have-eh --have-std --error-printer -o $@ $<
-%: %.cpp
- $(CXX) $(TEST_CPPFLAGS) $(AM_CPPFLAGS) $(TEST_CXXFLAGS) $(AM_CXXFLAGS) -o $@ $(TEST_LDFLAGS) $(AM_LDFLAGS) $< @top_builddir@/src/libcvc4.a
-
-MOSTLYCLEANFILES = $(TESTS) $(TESTS:%=%.cpp)
-
-else
-
-# force a user-visible failure for "make check"
-TESTS = no_cxxtest
-
-endif
-
+SUBDIRS = unit regress
diff --git a/test/regress/Makefile.am b/test/regress/Makefile.am
new file mode 100644
index 000000000..61deb03e6
--- /dev/null
+++ b/test/regress/Makefile.am
@@ -0,0 +1,3 @@
+TESTS_ENVIRONMENT = echo
+TESTS = \
+ bug1.cvc
diff --git a/test/regress/bug1.cvc b/test/regress/bug1.cvc
new file mode 100644
index 000000000..d2c24a438
--- /dev/null
+++ b/test/regress/bug1.cvc
@@ -0,0 +1,11 @@
+%% Regression level = 0
+%% Result = Valid
+%% Runtime = 1
+%% Language = presentation
+x : REAL;
+y : REAL;
+f : REAL -> REAL;
+ASSERT ((x > y) => f(x) > f (y));
+ASSERT (x = 3);
+ASSERT (y = 2);
+QUERY(f(x) > f (y));
diff --git a/test/unit/Makefile.am b/test/unit/Makefile.am
new file mode 100644
index 000000000..0f9df5e2f
--- /dev/null
+++ b/test/unit/Makefile.am
@@ -0,0 +1,36 @@
+if HAVE_CXXTESTGEN
+
+AM_CPPFLAGS = -I. "-I$(CXXTEST)" "-I@top_srcdir@/src/include" "-I@top_srcdir@/src"
+AM_CXXFLAGS = -fno-access-control
+#AM_LDFLAGS = -L@top_builddir@/src/libcvc4.la
+TESTS = \
+ expr/expr_black \
+ expr/expr_white
+
+lib_LTLIBRARIES = libdummy.la
+libdummy_la_SOURCES = expr/expr_black.cpp
+libdummy_la_LIBADD = @abs_top_builddir@/src/libcvc4.la
+
+$(TESTS:%=%.cpp): %.cpp: %.h
+ $(CXXTESTGEN) --have-eh --have-std --error-printer -o $@ $<
+$(TESTS): %: %.cpp
+# get these in here somehow
+# $(TEST_CPPFLAGS) $(TEST_CXXFLAGS) $(TEST_LDFLAGS)
+ $(LTCXXCOMPILE) -c -o $@.lo $<
+ $(CXXLINK) $@.lo \
+ @abs_top_builddir@/src/context/libcontext.la \
+ @abs_top_builddir@/src/expr/libexpr.la \
+ @abs_top_builddir@/src/smt/libsmt.la \
+ @abs_top_builddir@/src/theory/libtheory.la \
+ @abs_top_builddir@/src/util/libutil.la \
+ @abs_top_builddir@/src/prop/minisat/libminisat.la
+
+MOSTLYCLEANFILES = $(TESTS) $(TESTS:%=%.cpp)
+
+else
+
+# force a user-visible failure for "make check"
+TESTS = no_cxxtest
+
+endif
+
diff --git a/test/expr/expr_black.h b/test/unit/expr/expr_black.h
index 97746d1c4..97746d1c4 100644
--- a/test/expr/expr_black.h
+++ b/test/unit/expr/expr_black.h
diff --git a/test/expr/expr_white.h b/test/unit/expr/expr_white.h
index b6bfdd394..b6bfdd394 100644
--- a/test/expr/expr_white.h
+++ b/test/unit/expr/expr_white.h
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback