Skip to content

Commit 8d8dfa9

Browse files
committed
Add regression test for smt2 union support with --trace
1 parent 343cf7e commit 8d8dfa9

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#include <assert.h>
2+
#include <stdint.h>
3+
4+
union my_uniont
5+
{
6+
uint16_t a;
7+
uint8_t b;
8+
};
9+
10+
int main()
11+
{
12+
union my_uniont my_union = {.b = 5};
13+
assert(my_union.a == 5);
14+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
CORE
2+
padded.c
3+
--trace
4+
Passing problem to incremental SMT2 solving
5+
\[main\.assertion\.1\] line 13 assertion my_union\.a \=\= 5\: FAILURE
6+
my_union\=\{ \.a\=\d+ \} \(\d{8} 00000101\)
7+
^EXIT=10$
8+
^SIGNAL=0$
9+
--
10+
--
11+
Test that we support union values and traces for a example where the trace
12+
should include non deterministic padding.

0 commit comments

Comments
 (0)