summaryrefslogtreecommitdiff
path: root/test/unit/context/context_black.h
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@gmail.com>2010-03-14 01:55:36 +0000
committerMorgan Deters <mdeters@gmail.com>2010-03-14 01:55:36 +0000
commitbb21cdc3a551fa46b5e77345bb5cbcb55cba2fa6 (patch)
tree7d8edeea34fe8f9ab87ed04957f92c73505dc965 /test/unit/context/context_black.h
parent7eff5dfa38e016bb759a5daf5b0afef0a057eb47 (diff)
* test/unit/context/context_black.h: added a test for Clark's fix to bug #45.
* test/unit/context/cdlist_black.h: comment fix
Diffstat (limited to 'test/unit/context/context_black.h')
-rw-r--r--test/unit/context/context_black.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/test/unit/context/context_black.h b/test/unit/context/context_black.h
index 548b28d64..c9b47e400 100644
--- a/test/unit/context/context_black.h
+++ b/test/unit/context/context_black.h
@@ -37,6 +37,10 @@ public:
d_context = new Context;
}
+ void tearDown() {
+ delete d_context;
+ }
+
void testIntCDO() {
// Test that push/pop maintains the original value
CDO<int> a1(d_context);
@@ -62,7 +66,12 @@ public:
#endif /* CVC4_ASSERTIONS */
}
- void tearDown() {
- delete d_context;
+ void testDtor() {
+ // Destruction of ContextObj was broken in revision 324 (bug #45) when
+ // at a higher context level with an intervening modification.
+ // (The following caused a "pure virtual method called" error.)
+ CDO<int> i(d_context);
+ d_context->push();
+ i = 5;
}
};
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback