Skip to content

Commit 050dbec

Browse files
author
thk123
committed
fixup unit tests
1 parent f02ba50 commit 050dbec

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

jbmc/unit/java-testing-utils/require_goto_statements.cpp

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,16 @@ Author: Diffblue Ltd.
1111
#include <testing-utils/catch.hpp>
1212

1313
#include <algorithm>
14-
#include <util/expr_iterator.h>
1514
#include <goto-programs/goto_functions.h>
15+
#include <goto-programs/show_goto_functions.h>
16+
#include <iostream>
1617
#include <java_bytecode/java_types.h>
17-
#include <util/suffix.h>
18+
#include <util/expr_iterator.h>
1819
#include <util/expr_util.h>
19-
#include <iostream>
20-
#include <goto-programs/show_goto_functions.h>
20+
#include <util/suffix.h>
2121

22-
optionalt<symbol_exprt> root_object(exprt lhs_expr, const symbol_tablet &symbol_table)
22+
optionalt<symbol_exprt>
23+
root_object(exprt lhs_expr, const symbol_tablet &symbol_table)
2324
{
2425
auto expr = skip_typecast(lhs_expr);
2526
int dereference_balance = 0;
@@ -139,7 +140,7 @@ require_goto_statements::find_struct_component_assignments(
139140
if(
140141
superclass_expr.get_component_name() == supercomponent_name &&
141142
root_object(ode.root_object(), symbol_table)->get_identifier() ==
142-
structure_name)
143+
structure_name)
143144
{
144145
if(
145146
code_assign.rhs() ==
@@ -161,7 +162,8 @@ require_goto_statements::find_struct_component_assignments(
161162
// - component name: \p component_name
162163
// - operand (component of): symbol for \p structure_name
163164

164-
const auto &root_object = ::root_object(member_expr.struct_op(), symbol_table);
165+
const auto &root_object =
166+
::root_object(member_expr.struct_op(), symbol_table);
165167
if(
166168
root_object && root_object->get_identifier() == structure_name &&
167169
member_expr.get_component_name() == component_name)
@@ -352,7 +354,9 @@ const irep_idt &require_goto_statements::require_struct_component_assignment(
352354
superclass_name,
353355
component_name,
354356
symbol_table);
355-
INFO("looking for " << component_name << " in " << (superclass_name ? *superclass_name : structure_name));
357+
INFO(
358+
"looking for " << component_name << " in "
359+
<< (superclass_name ? *superclass_name : structure_name));
356360
REQUIRE(component_assignments.non_null_assignments.size() == 1);
357361

358362
// We are expecting that the resulting statement can be of two forms:

0 commit comments

Comments
 (0)