summaryrefslogtreecommitdiff
path: root/test/unit/expr/attribute_white.h
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@gmail.com>2010-04-04 23:03:52 +0000
committerMorgan Deters <mdeters@gmail.com>2010-04-04 23:03:52 +0000
commitff53861016427723a7c29e9bbca6f497b4556164 (patch)
tree4ed798e2f7dfa31283f7d14d44e70c77badf6b75 /test/unit/expr/attribute_white.h
parent42c58baf0a2a96c1f3bd797d64834d02adfb9a59 (diff)
* Addressed issues brought up in Chris's review of Morgan's
NodeManager (bug #65). Better documentation, etc. * As part of this, removed NodeManager::mkVar() (which created a variable of unknown type). This requires changes to lots of unit tests, which were using this function. * Performed some review of parser code (my code review #73). + I changed the way exceptions were caught and rethrown in src/parser/input.cpp. + ParserExceptions weren't being properly constructed (d_line and d_column weren't intiialized and could contain junk, leading to weird error messages). Fixed. * Fix to the current working directory used by run_regression script. Makes exceptional output easier to match against (in expected error output). * (configure.ac) Ensure that CFLAGS has -fexceptions in it, in case we compile any C code and don't use the C++ compiler.
Diffstat (limited to 'test/unit/expr/attribute_white.h')
-rw-r--r--test/unit/expr/attribute_white.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/test/unit/expr/attribute_white.h b/test/unit/expr/attribute_white.h
index 64c768a13..e0d9d6bf4 100644
--- a/test/unit/expr/attribute_white.h
+++ b/test/unit/expr/attribute_white.h
@@ -60,6 +60,7 @@ class AttributeWhite : public CxxTest::TestSuite {
Context* d_ctxt;
NodeManager* d_nm;
NodeManagerScope* d_scope;
+ Type* d_booleanType;
public:
@@ -67,6 +68,8 @@ public:
d_ctxt = new Context;
d_nm = new NodeManager(d_ctxt);
d_scope = new NodeManagerScope(d_nm);
+
+ d_booleanType = d_nm->booleanType();
}
void tearDown() {
@@ -150,9 +153,9 @@ public:
//Debug.on("boolattr");
- Node a = d_nm->mkVar();
- Node b = d_nm->mkVar();
- Node c = d_nm->mkVar();
+ Node a = d_nm->mkVar(d_booleanType);
+ Node b = d_nm->mkVar(d_booleanType);
+ Node c = d_nm->mkVar(d_booleanType);
Debug("boolattr", "get flag 1 on a (should be F)\n");
TS_ASSERT(! a.getAttribute(TestFlag1cd()));
@@ -280,10 +283,10 @@ public:
//Debug.on("boolattr");
- Node a = d_nm->mkVar();
- Node b = d_nm->mkVar();
- Node c = d_nm->mkVar();
- Node unnamed = d_nm->mkVar();
+ Node a = d_nm->mkVar(d_booleanType);
+ Node b = d_nm->mkVar(d_booleanType);
+ Node c = d_nm->mkVar(d_booleanType);
+ Node unnamed = d_nm->mkVar(d_booleanType);
a.setAttribute(VarNameAttr(), "a");
b.setAttribute(VarNameAttr(), "b");
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback