Skip to content

Commit 541cd8a

Browse files
committed
Use set_initial_value in format unit test
To avoid directly setting the operands.
1 parent b5df13b commit 541cd8a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

unit/util/format.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ TEST_CASE("Format a declaration statement.", "[core][util][format]")
1717
const signedbv_typet int_type{32};
1818
code_declt declaration{symbol_exprt{"foo", int_type}};
1919
REQUIRE(format_to_string(declaration) == "decl signedbv[32] foo;");
20-
declaration.add_to_operands(int_type.zero_expr());
20+
declaration.set_initial_value({int_type.zero_expr()});
2121
REQUIRE(format_to_string(declaration) == "decl signedbv[32] foo = 0;");
2222
}

0 commit comments

Comments
 (0)