Skip to content

Unit tests: use null_message_handler from testing utils #2901

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 5, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions unit/analyses/ai/ai.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
/// Unit tests for ait

#include <testing-utils/catch.hpp>
#include <testing-utils/message.h>

#include <analyses/ai.h>

Expand Down Expand Up @@ -239,8 +240,7 @@ SCENARIO(

goto_model.symbol_table.add(start);

null_message_handlert nullout;
goto_convert(goto_model, nullout);
goto_convert(goto_model, null_message_handler);

WHEN("The target program is analysed")
{
Expand Down
7 changes: 2 additions & 5 deletions unit/analyses/constant_propagator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@ Author: Diffblue Ltd
\*******************************************************************/

#include <testing-utils/catch.hpp>
#include <testing-utils/message.h>

#include <analyses/constant_propagator.h>

#include <ansi-c/ansi_c_language.h>

#include <goto-programs/goto_convert_functions.h>

#include <util/message.h>

static bool starts_with_x(const exprt &e, const namespacet &)
{
if(e.id() != ID_symbol)
Expand All @@ -27,8 +26,6 @@ SCENARIO("constant_propagator", "[core][analyses][constant_propagator]")
{
GIVEN("A simple GOTO program")
{
null_message_handlert null_out;

goto_modelt goto_model;
namespacet ns(goto_model.symbol_table);

Expand Down Expand Up @@ -65,7 +62,7 @@ SCENARIO("constant_propagator", "[core][analyses][constant_propagator]")
goto_model.symbol_table.add(local_y);
goto_model.symbol_table.add(main_function_symbol);

goto_convert(goto_model, null_out);
goto_convert(goto_model, null_message_handler);

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

Expand Down
1 change: 0 additions & 1 deletion unit/path_strategies.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ Author: Kareem Khazem <[email protected]>, 2018

#include <util/cmdline.h>
#include <util/config.h>
#include <util/cout_message.h>
#include <util/tempfile.h>

// The actual test suite.
Expand Down