summaryrefslogtreecommitdiff
path: root/test/unit/api/opterm_black.h
diff options
context:
space:
mode:
authorAndres Noetzli <andres.noetzli@gmail.com>2018-12-14 22:56:03 -0800
committerAndres Noetzli <andres.noetzli@gmail.com>2018-12-14 22:56:03 -0800
commit70efd4b260b9c23cfedc75d673513252ed6b458b (patch)
tree8ddd4b49bd6d01ef61981fe8c9cb7c869f52c9bc /test/unit/api/opterm_black.h
parent5bb74049b9ae776fe70e6f9a57dd85d1434147f1 (diff)
parent4983fb0e4339d1c03c8eb5567aca566a378114ea (diff)
Merge branch 'master' into aggSkolemSharing
Diffstat (limited to 'test/unit/api/opterm_black.h')
-rw-r--r--test/unit/api/opterm_black.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/test/unit/api/opterm_black.h b/test/unit/api/opterm_black.h
new file mode 100644
index 000000000..637301dd3
--- /dev/null
+++ b/test/unit/api/opterm_black.h
@@ -0,0 +1,57 @@
+/********************* */
+/*! \file opterm_black.h
+ ** \verbatim
+ ** Top contributors (to current version):
+ ** Aina Niemetz
+ ** 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 OpTermBlack : public CxxTest::TestSuite
+{
+ public:
+ void setUp() override {}
+ void tearDown() override {}
+
+ void testGetKind();
+ void testGetSort();
+ void testIsNull();
+
+ private:
+ Solver d_solver;
+};
+
+void OpTermBlack::testGetKind()
+{
+ OpTerm x;
+ TS_ASSERT_THROWS(x.getSort(), CVC4ApiException&);
+ x = d_solver.mkOpTerm(BITVECTOR_EXTRACT_OP, 31, 1);
+ TS_ASSERT_THROWS_NOTHING(x.getKind());
+}
+
+void OpTermBlack::testGetSort()
+{
+ OpTerm x;
+ TS_ASSERT_THROWS(x.getSort(), CVC4ApiException&);
+ x = d_solver.mkOpTerm(BITVECTOR_EXTRACT_OP, 31, 1);
+ TS_ASSERT_THROWS_NOTHING(x.getSort());
+}
+
+void OpTermBlack::testIsNull()
+{
+ OpTerm x;
+ TS_ASSERT(x.isNull());
+ x = d_solver.mkOpTerm(BITVECTOR_EXTRACT_OP, 31, 1);
+ TS_ASSERT(!x.isNull());
+}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback