diff options
Diffstat (limited to 'test')
-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; + } + } }; |