diff options
author | Morgan Deters <mdeters@gmail.com> | 2010-03-12 23:52:14 +0000 |
---|---|---|
committer | Morgan Deters <mdeters@gmail.com> | 2010-03-12 23:52:14 +0000 |
commit | c8e9b1d6422b56476a2efb3fbaf19bce66de4c2b (patch) | |
tree | aa2b6400b7a5663599eff687310c509156ca788d /test/unit/expr | |
parent | 856567b63c56b238db8a5bb84ad0da7990c1f1eb (diff) |
* src/context/cdmap.h: rename orderedIterator to iterator, do away
with old iterator (closes bug #47).
* src/context/cdset.h: implemented.
* src/expr/node_builder.h: fixed all the strict-aliasing warnings.
* Remove Node::hash() and Expr::hash() (they had been aliases for
getId()). There's now a NodeValue::internalHash(), for internal
expr package purposes only, that doesn't depend on the ID. That's
the only hashing of Nodes or Exprs.
* Automake-quiet generation of kind.h, theoryof_table.h, and CVC and
SMT parsers.
* various minor code cleanups.
Diffstat (limited to 'test/unit/expr')
-rw-r--r-- | test/unit/expr/node_black.h | 10 | ||||
-rw-r--r-- | test/unit/expr/node_builder_black.h | 21 |
2 files changed, 21 insertions, 10 deletions
diff --git a/test/unit/expr/node_black.h b/test/unit/expr/node_black.h index 96f02c489..c1ece1145 100644 --- a/test/unit/expr/node_black.h +++ b/test/unit/expr/node_black.h @@ -258,16 +258,6 @@ public: } - void testHash() { - /* Not sure how to test this except survial... */ - Node a = d_nodeManager->mkNode(ITE); - Node b = d_nodeManager->mkNode(ITE); - - TS_ASSERT(b.hash() == a.hash()); - } - - - void testEqNode() { /*Node eqNode(const Node& right) const;*/ diff --git a/test/unit/expr/node_builder_black.h b/test/unit/expr/node_builder_black.h index ab3c1c842..46e524f59 100644 --- a/test/unit/expr/node_builder_black.h +++ b/test/unit/expr/node_builder_black.h @@ -647,4 +647,25 @@ public: TS_ASSERT_EQUALS(Node(- a + b), d_nm->mkNode(PLUS, d_nm->mkNode(UMINUS, a), b)); TS_ASSERT_EQUALS(Node(- a * b), d_nm->mkNode(MULT, d_nm->mkNode(UMINUS, a), b)); } + + /** + * This tests the "stack builder" + */ + void testStackBuilder() { + try { + for(unsigned i = 0; i < 100; ++i) { + size_t n = 1 + (rand() % 50); + + // make a builder "b" with a backing store for n children + makeStackNodeBuilder(b, n); + + // build one-past-the-end + for(size_t j = 0; j <= n; ++j) { + b << Node::null(); + } + } + } catch(Exception e) { + std::cout << e; + } + } }; |