summaryrefslogtreecommitdiff
path: root/test/unit/main/interactive_shell_black.h
diff options
context:
space:
mode:
authorAina Niemetz <aina.niemetz@gmail.com>2018-08-01 12:08:02 -0700
committerGitHub <noreply@github.com>2018-08-01 12:08:02 -0700
commit149134dfdb5a435ae4d1bea1a93ae3bde28fd646 (patch)
tree691f3ef98a01160363069badd046577289046228 /test/unit/main/interactive_shell_black.h
parentc85d906d4fc8da9e31d96804ccbf6d52ec22cdd5 (diff)
InteractiveShell: Remove redundant options argument. (#2244)
Diffstat (limited to 'test/unit/main/interactive_shell_black.h')
-rw-r--r--test/unit/main/interactive_shell_black.h29
1 files changed, 15 insertions, 14 deletions
diff --git a/test/unit/main/interactive_shell_black.h b/test/unit/main/interactive_shell_black.h
index e42172251..cf68b5465 100644
--- a/test/unit/main/interactive_shell_black.h
+++ b/test/unit/main/interactive_shell_black.h
@@ -38,13 +38,14 @@ private:
stringstream* d_sin;
stringstream* d_sout;
- /** Read up to maxCommands+1 from the shell and throw an assertion
- error if it's fewer than minCommands and more than maxCommands.
- Note that an empty string followed by EOF may be returned as an
- empty command, and not NULL (subsequent calls to readCommand()
- should return NULL). E.g., "CHECKSAT;\n" may return two
- commands: the CHECKSAT, followed by an empty command, followed
- by NULL. */
+ /**
+ * Read up to maxCommands+1 from the shell and throw an assertion error if
+ * it's fewer than minCommands and more than maxCommands.
+ * Note that an empty string followed by EOF may be returned as an empty
+ * command, and not NULL (subsequent calls to readCommand() should return
+ * NULL). E.g., "CHECKSAT;\n" may return two commands: the CHECKSAT,
+ * followed by an empty command, followed by NULL.
+ */
void countCommands(InteractiveShell& shell,
int minCommands,
int maxCommands) {
@@ -60,12 +61,12 @@ private:
public:
void setUp() {
- d_exprManager = new ExprManager;
d_sin = new stringstream;
d_sout = new stringstream;
d_options.set(options::in, d_sin);
d_options.set(options::out, d_sout);
d_options.set(options::inputLanguage, language::input::LANG_CVC4);
+ d_exprManager = new ExprManager(d_options);
}
void tearDown() {
@@ -76,18 +77,18 @@ private:
void testAssertTrue() {
*d_sin << "ASSERT TRUE;\n" << flush;
- InteractiveShell shell(*d_exprManager, d_options);
+ InteractiveShell shell(*d_exprManager);
countCommands( shell, 1, 1 );
}
void testQueryFalse() {
*d_sin << "QUERY FALSE;\n" << flush;
- InteractiveShell shell(*d_exprManager, d_options);
+ InteractiveShell shell(*d_exprManager);
countCommands( shell, 1, 1 );
}
void testDefUse() {
- InteractiveShell shell(*d_exprManager, d_options);
+ InteractiveShell shell(*d_exprManager);
*d_sin << "x : REAL; ASSERT x > 0;\n" << flush;
/* readCommand may return a sequence, so we can't say for sure
whether it will return 1 or 2... */
@@ -95,7 +96,7 @@ private:
}
void testDefUse2() {
- InteractiveShell shell(*d_exprManager, d_options);
+ InteractiveShell shell(*d_exprManager);
/* readCommand may return a sequence, see above. */
*d_sin << "x : REAL;\n" << flush;
Command* tmp = shell.readCommand();
@@ -105,14 +106,14 @@ private:
}
void testEmptyLine() {
- InteractiveShell shell(*d_exprManager, d_options);
+ InteractiveShell shell(*d_exprManager);
*d_sin << flush;
countCommands(shell,0,0);
}
void testRepeatedEmptyLines() {
*d_sin << "\n\n\n";
- InteractiveShell shell(*d_exprManager, d_options);
+ InteractiveShell shell(*d_exprManager);
/* Might return up to four empties, might return nothing */
countCommands( shell, 0, 3 );
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback