summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/unit/api/CMakeLists.txt1
-rw-r--r--test/unit/api/term_black.h37
2 files changed, 38 insertions, 0 deletions
diff --git a/test/unit/api/CMakeLists.txt b/test/unit/api/CMakeLists.txt
index 90d34f7c6..025575e41 100644
--- a/test/unit/api/CMakeLists.txt
+++ b/test/unit/api/CMakeLists.txt
@@ -2,3 +2,4 @@
# Add unit tests
cvc4_add_unit_test_black(api_guards_black api)
+cvc4_add_unit_test_black(term_black api)
diff --git a/test/unit/api/term_black.h b/test/unit/api/term_black.h
new file mode 100644
index 000000000..c2ca1cb08
--- /dev/null
+++ b/test/unit/api/term_black.h
@@ -0,0 +1,37 @@
+/********************* */
+/*! \file term_black.h
+ ** \verbatim
+ ** Top contributors (to current version):
+ ** Andres Noetzli
+ ** This file is part of the CVC4 project.
+ ** Copyright (c) 2009-2018 by the authors listed in the file AUTHORS
+ ** in the top-level source directory) and their institutional affiliations.
+ ** All rights reserved. See the file COPYING in the top-level source
+ ** directory for licensing information.\endverbatim
+ **
+ ** \brief Black box testing of the Term class
+ **/
+
+#include <cxxtest/TestSuite.h>
+
+#include "api/cvc4cpp.h"
+
+using namespace CVC4::api;
+
+class TermBlack : public CxxTest::TestSuite
+{
+ public:
+ void setUp() override {}
+ void tearDown() override {}
+
+ void testTermAssignment()
+ {
+ Term t1 = d_solver.mkReal(1);
+ Term t2 = t1;
+ t2 = d_solver.mkReal(2);
+ TS_ASSERT_EQUALS(t1, d_solver.mkReal(1));
+ }
+
+ private:
+ Solver d_solver;
+};
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback