Skip to content

Commit d105158

Browse files
thomasspriggsNlightNFotis
authored andcommitted
Add debug printing of unit test mock commmands/responses
1 parent 13edb7b commit d105158

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

unit/solvers/smt2_incremental/smt2_incremental_decision_procedure.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,14 @@ struct decision_procedure_test_environmentt final
130130
decision_procedure_test_environmentt() = default;
131131
};
132132

133+
#include <iostream>
134+
#define WATCHVAR( var ) \
135+
std::cerr << "DBG: " << __FILE__ << "(" << __LINE__ << ") " << #var << \
136+
" = [" << (var) << "]" << std::endl
137+
133138
void decision_procedure_test_environmentt::send(const smt_commandt &smt_command)
134139
{
140+
WATCHVAR(smt_command);
135141
sent_commands.push_back(smt_command);
136142
}
137143

@@ -140,6 +146,7 @@ smt_responset decision_procedure_test_environmentt::receive_response()
140146
INVARIANT(
141147
!mock_responses.empty(), "There must be responses remaining for test.");
142148
smt_responset response = mock_responses.front();
149+
WATCHVAR(response.pretty());
143150
mock_responses.pop_front();
144151
return response;
145152
}

0 commit comments

Comments
 (0)