summaryrefslogtreecommitdiff
path: root/test/unit/expr/node_black.h
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@gmail.com>2012-06-09 00:35:38 +0000
committerMorgan Deters <mdeters@gmail.com>2012-06-09 00:35:38 +0000
commit700689a4e4ed42b5198816611eac5bcc1278284d (patch)
tree0d6029f9bc4f46a721930a27a47ac487771c452e /test/unit/expr/node_black.h
parenta0411d4baad389ce88d4bd26edc8ed811625887c (diff)
Dagification of output expressions.
By default, common subexpressions are dagified if they appear > 1 time and are not constants or variables. This can be changed with --default-expr-dag=N --- N is a threshold such that if the subexpression occurs > N times, it is dagified; a setting of 0 turns off dagification entirely. If you notice strange dumping behavior (taking too long to print anything, e.g.), revert to the old behavior with --default-expr-dag=0 and let me know of the problem.
Diffstat (limited to 'test/unit/expr/node_black.h')
-rw-r--r--test/unit/expr/node_black.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/unit/expr/node_black.h b/test/unit/expr/node_black.h
index 40545e5e8..36a92ec2f 100644
--- a/test/unit/expr/node_black.h
+++ b/test/unit/expr/node_black.h
@@ -547,11 +547,12 @@ public:
Node o = NodeBuilder<>() << n << n << kind::XOR;
stringstream sstr;
+ sstr << Node::dag(false);
n.toStream(sstr);
TS_ASSERT(sstr.str() == "(AND w (OR x y) z)");
sstr.str(string());
- o.toStream(sstr);
+ o.toStream(sstr, -1, false, 0);
TS_ASSERT(sstr.str() == "(XOR (AND w (OR x y) z) (AND w (OR x y) z))");
sstr.str(string());
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback