Skip to content

Commit 56f6925

Browse files
Add float tests
1 parent 97a6cef commit 56f6925

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#include <assert.h>
2+
3+
int main()
4+
{
5+
// field declarations
6+
__CPROVER_field_decl_local("field1", (unsigned __CPROVER_bitvector[7])0);
7+
8+
unsigned __CPROVER_bitvector[7] v;
9+
float x;
10+
assert(!__CPROVER_get_field(&x, "field1"));
11+
12+
__CPROVER_set_field(&x, "field1", v);
13+
assert(__CPROVER_get_field(&x, "field1") == v);
14+
15+
return 0;
16+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CORE
2+
main.c
3+
--verbosity 10
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
^VERIFICATION SUCCESSFUL$
7+
--
8+
^warning: ignoring

0 commit comments

Comments
 (0)