7
7
#else
8
8
9
9
# include < testing-utils/use_catch.h>
10
+ # include < testing-utils/message.h>
10
11
# include < util/optional.h>
11
12
# include < util/piped_process.h>
12
13
# include < util/string_utils.h>
@@ -20,7 +21,7 @@ TEST_CASE(
20
21
std::vector<std::string> commands;
21
22
commands.push_back (" /bin/echo" );
22
23
commands.push_back (to_be_echoed);
23
- piped_processt process = piped_processt (commands);
24
+ piped_processt process = piped_processt (commands, null_message_handler );
24
25
25
26
// This is an indirect way to detect when the pipe has something. This
26
27
// could (in theory) also return when there is an error, but this unit
@@ -40,7 +41,7 @@ TEST_CASE(
40
41
// Need to give path to avoid shell built-in invocation
41
42
std::vector<std::string> commands;
42
43
commands.push_back (" jkfadsjfkljdskalfjksdakjfkjdskjflkjasljdflksdjj" );
43
- piped_processt process = piped_processt (commands);
44
+ piped_processt process = piped_processt (commands, null_message_handler );
44
45
45
46
// This is an indirect way to detect when the pipe has something. This
46
47
// could (in theory) also return when there is an error, but this unit
@@ -55,7 +56,7 @@ TEST_CASE(
55
56
while (too_many_tries < 5 && response.length () < 64 )
56
57
{
57
58
// Wait a short amount of time to try and receive
58
- process.can_receive (10 );
59
+ process.can_receive (50 );
59
60
response += process.receive ();
60
61
too_many_tries++;
61
62
}
@@ -70,7 +71,7 @@ TEST_CASE(
70
71
std::vector<std::string> commands;
71
72
commands.push_back (" z3" );
72
73
commands.push_back (" -in" );
73
- piped_processt process = piped_processt (commands);
74
+ piped_processt process = piped_processt (commands, null_message_handler );
74
75
75
76
REQUIRE (
76
77
process.send (" (echo \" hi\" )\n " ) ==
@@ -92,7 +93,7 @@ TEST_CASE(
92
93
commands.push_back (" z3" );
93
94
commands.push_back (" -in" );
94
95
const std::string termination_statement = " (exit)\n " ;
95
- piped_processt process = piped_processt (commands);
96
+ piped_processt process = piped_processt (commands, null_message_handler );
96
97
97
98
REQUIRE (
98
99
process.send (" (echo \" hi\" )\n " ) ==
@@ -122,7 +123,7 @@ TEST_CASE(
122
123
commands.push_back (" z3" );
123
124
commands.push_back (" -in" );
124
125
commands.push_back (" -smt2" );
125
- piped_processt process = piped_processt (commands);
126
+ piped_processt process = piped_processt (commands, null_message_handler );
126
127
127
128
std::string message =
128
129
" (set-logic QF_LIA) (declare-const x Int) (declare-const y Int) (assert (> "
@@ -146,7 +147,7 @@ TEST_CASE(
146
147
commands.push_back (" z3" );
147
148
commands.push_back (" -in" );
148
149
commands.push_back (" -smt2" );
149
- piped_processt process = piped_processt (commands);
150
+ piped_processt process = piped_processt (commands, null_message_handler );
150
151
151
152
std::string statement =
152
153
" (set-logic QF_LIA) (declare-const x Int) (declare-const y Int) (assert (> "
@@ -168,7 +169,7 @@ TEST_CASE(
168
169
std::vector<std::string> commands;
169
170
commands.push_back (" z3" );
170
171
commands.push_back (" -in" );
171
- piped_processt process = piped_processt (commands);
172
+ piped_processt process = piped_processt (commands, null_message_handler );
172
173
173
174
REQUIRE (
174
175
process.send (" (echo \" hi\" )\n " ) ==
@@ -198,7 +199,7 @@ TEST_CASE(
198
199
commands.push_back (" z3" );
199
200
commands.push_back (" -in" );
200
201
commands.push_back (" -smt2" );
201
- piped_processt process = piped_processt (commands);
202
+ piped_processt process = piped_processt (commands, null_message_handler );
202
203
203
204
std::string statement =
204
205
" (set-logic QF_LIA) (declare-const x Int) (declare-const y Int) (assert (> "
@@ -254,7 +255,7 @@ TEST_CASE(
254
255
commands.push_back (" z3" );
255
256
commands.push_back (" -in" );
256
257
commands.push_back (" -smt2" );
257
- piped_processt process = piped_processt (commands);
258
+ piped_processt process = piped_processt (commands, null_message_handler );
258
259
259
260
std::string statement =
260
261
" (set-logic QF_LIA) (declare-const x Int) (declare-const y Int) (assert (> "
0 commit comments