summaryrefslogtreecommitdiff
path: root/test/unit
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/Makefile.am36
-rw-r--r--test/unit/expr/expr_black.h19
-rw-r--r--test/unit/expr/expr_white.h19
3 files changed, 74 insertions, 0 deletions
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/unit/expr/expr_black.h b/test/unit/expr/expr_black.h
new file mode 100644
index 000000000..97746d1c4
--- /dev/null
+++ b/test/unit/expr/expr_black.h
@@ -0,0 +1,19 @@
+/* Black box testing of CVC4::Expr. */
+
+#include <cxxtest/TestSuite.h>
+
+#include "cvc4_expr.h"
+
+using namespace CVC4;
+
+class ExprBlack : public CxxTest::TestSuite {
+public:
+
+ void testNull() {
+ Expr::s_null;
+ }
+
+ void testCopyCtor() {
+ Expr e(Expr::s_null);
+ }
+};
diff --git a/test/unit/expr/expr_white.h b/test/unit/expr/expr_white.h
new file mode 100644
index 000000000..b6bfdd394
--- /dev/null
+++ b/test/unit/expr/expr_white.h
@@ -0,0 +1,19 @@
+/* White box testing of CVC4::Expr. */
+
+#include <cxxtest/TestSuite.h>
+
+#include "cvc4_expr.h"
+
+using namespace CVC4;
+
+class ExprWhite : public CxxTest::TestSuite {
+public:
+
+ void testNull() {
+ Expr::s_null;
+ }
+
+ void testCopyCtor() {
+ Expr e(Expr::s_null);
+ }
+};
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback