Skip to content

Commit 8af80a7

Browse files
committed
When evaluating the value of an expr, the result now will be among +1/-1/0, instead of true/false, as 0 is used to specify that the expr does not exist (in the considered parent-expr context).
1 parent 18c4d53 commit 8af80a7

File tree

3 files changed

+139
-80
lines changed

3 files changed

+139
-80
lines changed

regression/cbmc-cover/mcdc7/main.c

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
int main()
2+
{
3+
signed x, y;
4+
5+
y = x*123<0 ? 0 : (x*123>100 ? 100 : x*123 );
6+
7+
return 1;
8+
}

regression/cbmc-cover/mcdc7/test.desc

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
CORE
2+
main.c
3+
--cover mcdc
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
^\[main.coverage.1\] file main.c line 5 function main decision/condition `x \* 123 > 100.* false: SATISFIED$
7+
^\[main.coverage.2\] file main.c line 5 function main decision/condition `x \* 123 > 100.* true: SATISFIED$
8+
^\[main.coverage.3\] file main.c line 5 function main decision/condition `x \* 123 < 0.* false: SATISFIED$
9+
^\[main.coverage.4\] file main.c line 5 function main decision/condition `x \* 123 < 0.* true: SATISFIED$
10+
^\*\* .* of .* covered (100.0%)$
11+
^\*\* Used 2 iterations$
12+
--
13+
^warning: ignoring

0 commit comments

Comments
 (0)