diff options
Diffstat (limited to 'test/unit/parser/parser_black.h')
-rw-r--r-- | test/unit/parser/parser_black.h | 38 |
1 files changed, 34 insertions, 4 deletions
diff --git a/test/unit/parser/parser_black.h b/test/unit/parser/parser_black.h index 0e0835327..88a6eaf57 100644 --- a/test/unit/parser/parser_black.h +++ b/test/unit/parser/parser_black.h @@ -169,21 +169,33 @@ protected: } ParserBlack(InputLanguage lang) : - d_lang(lang), - d_exprManager(new ExprManager()) { + d_lang(lang) { } -public: - virtual ~ParserBlack() { + void setUp() { +cout << "SET UP\n"; + d_exprManager = new ExprManager; + } + + void tearDown() { delete d_exprManager; } }; class Cvc4ParserTest : public CxxTest::TestSuite, public ParserBlack { + typedef ParserBlack super; public: Cvc4ParserTest() : ParserBlack(LANG_CVC4) { } + void setUp() { + super::setUp(); + } + + void tearDown() { + super::tearDown(); + } + void testGoodCvc4Inputs() { tryGoodInput(""); // empty string is OK tryGoodInput("ASSERT TRUE;"); @@ -228,9 +240,19 @@ public: }; class SmtParserTest : public CxxTest::TestSuite, public ParserBlack { + typedef ParserBlack super; + public: SmtParserTest() : ParserBlack(LANG_SMTLIB) { } + void setUp() { + super::setUp(); + } + + void tearDown() { + super::tearDown(); + } + void testGoodSmtInputs() { tryGoodInput(""); // empty string is OK tryGoodInput("(benchmark foo :assumption true)"); @@ -286,6 +308,14 @@ class Smt2ParserTest : public CxxTest::TestSuite, public ParserBlack { public: Smt2ParserTest() : ParserBlack(LANG_SMTLIB_V2) { } + void setUp() { + super::setUp(); + } + + void tearDown() { + super::tearDown(); + } + void setupContext(Smt2& parser) { parser.addTheory(Smt2::THEORY_CORE); super::setupContext(parser); |