Skip to content

Commit aac7993

Browse files
committed
Test printing of bit vector extract
1 parent f520e9e commit aac7993

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

unit/solvers/smt2_incremental/smt_to_smt2_string.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
#include <util/mp_arith.h>
44

5+
#include <solvers/smt2_incremental/smt_bit_vector_theory.h>
56
#include <solvers/smt2_incremental/smt_commands.h>
67
#include <solvers/smt2_incremental/smt_core_theory.h>
78
#include <solvers/smt2_incremental/smt_logics.h>
@@ -29,6 +30,15 @@ TEST_CASE(
2930
CHECK(smt_to_smt2_string(smt_bit_vector_constant_termt{0, 8}) == "(_ bv0 8)");
3031
}
3132

33+
TEST_CASE(
34+
"Test smt_bit_vector extract to string conversion",
35+
"[core][smt2_incremental]")
36+
{
37+
CHECK(
38+
smt_to_smt2_string(smt_bit_vector_theoryt::extract(7, 3)(
39+
smt_bit_vector_constant_termt{0, 8})) == "((_ |extract| 7 3) (_ bv0 8))");
40+
}
41+
3242
TEST_CASE(
3343
"Test smt_bool_literal_termt to string conversion",
3444
"[core][smt2_incremental]")

0 commit comments

Comments
 (0)