Skip to content

Commit 2947eaa

Browse files
committed
Fixup second commit
1 parent 4019ae6 commit 2947eaa

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

unit/util/piped_process.cpp

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#else
88

99
# include <testing-utils/use_catch.h>
10+
# include <testing-utils/message.h>
1011
# include <util/optional.h>
1112
# include <util/piped_process.h>
1213
# include <util/string_utils.h>
@@ -20,7 +21,7 @@ TEST_CASE(
2021
std::vector<std::string> commands;
2122
commands.push_back("/bin/echo");
2223
commands.push_back(to_be_echoed);
23-
piped_processt process = piped_processt(commands);
24+
piped_processt process = piped_processt(commands, null_message_handler);
2425

2526
// This is an indirect way to detect when the pipe has something. This
2627
// could (in theory) also return when there is an error, but this unit
@@ -40,7 +41,7 @@ TEST_CASE(
4041
// Need to give path to avoid shell built-in invocation
4142
std::vector<std::string> commands;
4243
commands.push_back("jkfadsjfkljdskalfjksdakjfkjdskjflkjasljdflksdjj");
43-
piped_processt process = piped_processt(commands);
44+
piped_processt process = piped_processt(commands, null_message_handler);
4445

4546
// This is an indirect way to detect when the pipe has something. This
4647
// could (in theory) also return when there is an error, but this unit
@@ -55,7 +56,7 @@ TEST_CASE(
5556
while(too_many_tries < 5 && response.length() < 64)
5657
{
5758
// Wait a short amount of time to try and receive
58-
process.can_receive(10);
59+
process.can_receive(50);
5960
response += process.receive();
6061
too_many_tries++;
6162
}
@@ -70,7 +71,7 @@ TEST_CASE(
7071
std::vector<std::string> commands;
7172
commands.push_back("z3");
7273
commands.push_back("-in");
73-
piped_processt process = piped_processt(commands);
74+
piped_processt process = piped_processt(commands, null_message_handler);
7475

7576
REQUIRE(
7677
process.send("(echo \"hi\")\n") ==
@@ -92,7 +93,7 @@ TEST_CASE(
9293
commands.push_back("z3");
9394
commands.push_back("-in");
9495
const std::string termination_statement = "(exit)\n";
95-
piped_processt process = piped_processt(commands);
96+
piped_processt process = piped_processt(commands, null_message_handler);
9697

9798
REQUIRE(
9899
process.send("(echo \"hi\")\n") ==
@@ -122,7 +123,7 @@ TEST_CASE(
122123
commands.push_back("z3");
123124
commands.push_back("-in");
124125
commands.push_back("-smt2");
125-
piped_processt process = piped_processt(commands);
126+
piped_processt process = piped_processt(commands, null_message_handler);
126127

127128
std::string message =
128129
"(set-logic QF_LIA) (declare-const x Int) (declare-const y Int) (assert (> "
@@ -146,7 +147,7 @@ TEST_CASE(
146147
commands.push_back("z3");
147148
commands.push_back("-in");
148149
commands.push_back("-smt2");
149-
piped_processt process = piped_processt(commands);
150+
piped_processt process = piped_processt(commands, null_message_handler);
150151

151152
std::string statement =
152153
"(set-logic QF_LIA) (declare-const x Int) (declare-const y Int) (assert (> "
@@ -168,7 +169,7 @@ TEST_CASE(
168169
std::vector<std::string> commands;
169170
commands.push_back("z3");
170171
commands.push_back("-in");
171-
piped_processt process = piped_processt(commands);
172+
piped_processt process = piped_processt(commands, null_message_handler);
172173

173174
REQUIRE(
174175
process.send("(echo \"hi\")\n") ==
@@ -198,7 +199,7 @@ TEST_CASE(
198199
commands.push_back("z3");
199200
commands.push_back("-in");
200201
commands.push_back("-smt2");
201-
piped_processt process = piped_processt(commands);
202+
piped_processt process = piped_processt(commands, null_message_handler);
202203

203204
std::string statement =
204205
"(set-logic QF_LIA) (declare-const x Int) (declare-const y Int) (assert (> "
@@ -254,7 +255,7 @@ TEST_CASE(
254255
commands.push_back("z3");
255256
commands.push_back("-in");
256257
commands.push_back("-smt2");
257-
piped_processt process = piped_processt(commands);
258+
piped_processt process = piped_processt(commands, null_message_handler);
258259

259260
std::string statement =
260261
"(set-logic QF_LIA) (declare-const x Int) (declare-const y Int) (assert (> "

0 commit comments

Comments
 (0)