Skip to content

Commit 82b4d5c

Browse files
authored
Merge pull request #2901 from tautschnig/null-message-handler
Unit tests: use null_message_handler from testing utils
2 parents a6d2e2a + 4747169 commit 82b4d5c

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

unit/analyses/ai/ai.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
/// Unit tests for ait
1111

1212
#include <testing-utils/catch.hpp>
13+
#include <testing-utils/message.h>
1314

1415
#include <analyses/ai.h>
1516

@@ -239,8 +240,7 @@ SCENARIO(
239240

240241
goto_model.symbol_table.add(start);
241242

242-
null_message_handlert nullout;
243-
goto_convert(goto_model, nullout);
243+
goto_convert(goto_model, null_message_handler);
244244

245245
WHEN("The target program is analysed")
246246
{

unit/analyses/constant_propagator.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,14 @@ Author: Diffblue Ltd
77
\*******************************************************************/
88

99
#include <testing-utils/catch.hpp>
10+
#include <testing-utils/message.h>
1011

1112
#include <analyses/constant_propagator.h>
1213

1314
#include <ansi-c/ansi_c_language.h>
1415

1516
#include <goto-programs/goto_convert_functions.h>
1617

17-
#include <util/message.h>
18-
1918
static bool starts_with_x(const exprt &e, const namespacet &)
2019
{
2120
if(e.id() != ID_symbol)
@@ -27,8 +26,6 @@ SCENARIO("constant_propagator", "[core][analyses][constant_propagator]")
2726
{
2827
GIVEN("A simple GOTO program")
2928
{
30-
null_message_handlert null_out;
31-
3229
goto_modelt goto_model;
3330
namespacet ns(goto_model.symbol_table);
3431

@@ -65,7 +62,7 @@ SCENARIO("constant_propagator", "[core][analyses][constant_propagator]")
6562
goto_model.symbol_table.add(local_y);
6663
goto_model.symbol_table.add(main_function_symbol);
6764

68-
goto_convert(goto_model, null_out);
65+
goto_convert(goto_model, null_message_handler);
6966

7067
const goto_functiont &main_function = goto_model.get_goto_function("main");
7168

unit/path_strategies.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ Author: Kareem Khazem <[email protected]>, 2018
2525

2626
#include <util/cmdline.h>
2727
#include <util/config.h>
28-
#include <util/cout_message.h>
2928
#include <util/tempfile.h>
3029

3130
// The actual test suite.

0 commit comments

Comments
 (0)