summaryrefslogtreecommitdiff
path: root/test/unit/util
diff options
context:
space:
mode:
authorClark Barrett <barrett@cs.nyu.edu>2011-04-08 13:22:18 +0000
committerClark Barrett <barrett@cs.nyu.edu>2011-04-08 13:22:18 +0000
commit16161eb039274162e1e464522e73a17f755a4e28 (patch)
tree1e63e54a0f9154fbd123569776bed38e30c6616c /test/unit/util
parentf2696072837541f16932b1fd5f5740d45b4341b9 (diff)
Added util class
Diffstat (limited to 'test/unit/util')
-rw-r--r--test/unit/util/trans_closure_black.h65
1 files changed, 65 insertions, 0 deletions
diff --git a/test/unit/util/trans_closure_black.h b/test/unit/util/trans_closure_black.h
new file mode 100644
index 000000000..99542223c
--- /dev/null
+++ b/test/unit/util/trans_closure_black.h
@@ -0,0 +1,65 @@
+/********************* */
+/*! \file trans_closure_black.h
+ ** \verbatim
+ ** Original author: barrett
+ ** Major contributors: none
+ ** Minor contributors (to current version): none
+ ** This file is part of the CVC4 prototype.
+ ** Copyright (c) 2009, 2010 The Analysis of Computer Systems Group (ACSys)
+ ** Courant Institute of Mathematical Sciences
+ ** New York University
+ ** See the file COPYING in the top-level source directory for licensing
+ ** information.\endverbatim
+ **
+ ** \brief Black box testing of CVC4::TransitiveClosure.
+ **
+ ** Black box testing of CVC4::TransitiveClosure.
+ **/
+
+
+#include "util/trans_closure.h"
+
+
+using namespace CVC4;
+using namespace CVC4::context;
+using namespace std;
+
+
+class TransitiveClosureBlack : public CxxTest::TestSuite {
+ Context* d_context;
+ TransitiveClosure* d_tc;
+
+public:
+
+ void setUp() {
+ d_context = new Context;
+ d_tc = new TransitiveClosure(d_context);
+ }
+
+ void tearDown() {
+ try {
+ delete d_tc;
+ delete d_context;
+ } catch(Exception& e) {
+ Warning() << std::endl << e << std::endl;
+ throw;
+ }
+ }
+
+ void testSimple() {
+ //Debug.on("cc");
+ // add terms, then add equalities
+
+ bool b;
+ b = d_tc->addEdge(1,2);
+ TS_ASSERT(!b);
+
+ b = d_tc->addEdge(2,3);
+ TS_ASSERT(!b);
+
+ b = d_tc->addEdge(3,1);
+ TS_ASSERT(b);
+ }
+
+
+};/* class TransitiveClosureBlack */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback