Skip to content

Commit a7b757b

Browse files
committed
Add tests for the bitwise operators (and, or, not, xor)
1 parent 2bc7239 commit a7b757b

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
CORE
2+
bitwise_ops.c
3+
--incremental-smt2-solver 'z3 --smt2 -in' --slice-formula
4+
\[main\.assertion\.1\] line \d+ A and B should be satisfiable: FAILURE
5+
\[main\.assertion\.2\] line \d+ A or B should be satisfiable: SUCCESS
6+
\[main\.assertion\.3\] line \d+ Not A equals B should be satisfiable: FAILURE
7+
^EXIT=10$
8+
^SIGNAL=0$
9+
--
10+
--
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
int main()
2+
{
3+
int a;
4+
int b;
5+
6+
__CPROVER_assume(a != 0);
7+
8+
__CPROVER_assert(a & b, "A and B should be satisfiable");
9+
__CPROVER_assert(a | b, "A or B should be satisfiable");
10+
// __CRPOVER_assert(a ^ b, "A xor B should be satisfiable");
11+
__CPROVER_assert(~a == b, "Not A equals B should be satisfiable");
12+
}

0 commit comments

Comments
 (0)