diff options
author | Morgan Deters <mdeters@gmail.com> | 2009-11-20 23:47:56 +0000 |
---|---|---|
committer | Morgan Deters <mdeters@gmail.com> | 2009-11-20 23:47:56 +0000 |
commit | 95e5ca98d4c22897c0192a78ebeeb05e4838db2b (patch) | |
tree | 7bd14dc25a240bc2b4f5152c4ee7b666763dbebe /test/unit | |
parent | cb56555734b5139f779e65cc6e628124ac6796e6 (diff) |
fixes to build/test system
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/Makefile.am | 36 | ||||
-rw-r--r-- | test/unit/expr/expr_black.h | 19 | ||||
-rw-r--r-- | test/unit/expr/expr_white.h | 19 |
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); + } +}; |