Skip to content

Commit 88ab75c

Browse files
committed
Add a regression test that drives the left shift behaviour in the new SMT backend
1 parent 643037e commit 88ab75c

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
int main()
2+
{
3+
int starting_val = 1;
4+
int shifting_places;
5+
__CPROVER_assume(shifting_places > 0);
6+
int result = starting_val << shifting_places;
7+
8+
__CPROVER_assert(result > 1, "Shifted result should be greater than one");
9+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CORE
2+
shift_left.c
3+
--incremental-smt2-solver 'z3 --smt2 -in' --slice-formula
4+
\[main\.assertion\.1\] line \d Shifted result should be greater than one: FAILURE
5+
^EXIT=10$
6+
^SIGNAL=0$
7+
--
8+
--

0 commit comments

Comments
 (0)