Skip to content

Commit 7065034

Browse files
committed
enum-trace1 regression test: ensure inputs are sane
The test descriptions expect valid enum values, which we didn't actually have any guarantee built into the test for.
1 parent a531153 commit 7065034

File tree

1 file changed

+3
-0
lines changed
  • regression/cbmc/enum-trace1

1 file changed

+3
-0
lines changed

regression/cbmc/enum-trace1/main.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ typedef enum ENUMT
1616

1717
void test(enum ENUM e, enum_t t)
1818
{
19+
// ensure sane input values
20+
__CPROVER_assume(__CPROVER_enum_is_in_range(e));
21+
__CPROVER_assume(__CPROVER_enum_is_in_range(t));
1922
enum ENUM ee = e;
2023
enum_t tt = t;
2124

0 commit comments

Comments
 (0)