Skip to content

Commit c389ff0

Browse files
committed
Make format unit test do something
6b88028 removed the existing test (for good reasons) but didn't replace it with any other.
1 parent 6b5c687 commit c389ff0

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

unit/util/format.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,14 @@
77
\*******************************************************************/
88

99
#include <util/bitvector_types.h>
10-
#include <util/format.h>
1110
#include <util/format_expr.h>
12-
#include <util/std_code.h>
11+
#include <util/std_expr.h>
1312

1413
#include <testing-utils/use_catch.h>
14+
15+
TEST_CASE("Format an expression.", "[core][util][format]")
16+
{
17+
const signedbv_typet int_type{32};
18+
plus_exprt plus{symbol_exprt{"foo", int_type}, symbol_exprt{"bar", int_type}};
19+
REQUIRE(format_to_string(plus) == "foo + bar");
20+
}

0 commit comments

Comments
 (0)