Skip to content

Commit a32ad65

Browse files
peterschrammelgiulio-garbi
authored andcommitted
Add test for --nondet-static-matching
1 parent b994bee commit a32ad65

File tree

3 files changed

+31
-1
lines changed

3 files changed

+31
-1
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#include <assert.h>
2+
3+
int do_nondet_init1;
4+
int init1;
5+
6+
int main(int argc, char **argv)
7+
{
8+
static int do_nondet_init2;
9+
static int init2;
10+
11+
assert(do_nondet_init1 == 0);
12+
assert(init1 == 0);
13+
assert(do_nondet_init2 == 0);
14+
assert(init2 == 0);
15+
16+
return 0;
17+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
CORE
2+
main.c
3+
--nondet-static-matching '.*\.c:.*nondet.*'
4+
^VERIFICATION FAILED$
5+
^EXIT=10$
6+
^SIGNAL=0$
7+
assertion do_nondet_init1 == 0: FAILURE
8+
assertion init1 == 0: SUCCESS
9+
assertion do_nondet_init2 == 0: FAILURE
10+
assertion init2 == 0: SUCCESS
11+
--
12+
--

src/goto-instrument/goto_instrument_parse_options.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1909,7 +1909,8 @@ void goto_instrument_parse_optionst::help()
19091909
" sequences match <seq>\n"
19101910
" --undefined-function-is-assume-false\n"
19111911
// NOLINTNEXTLINE(whitespace/line_length)
1912-
" convert each call to an undefined function to assume(false)\n"
1912+
" convert each call to an undefined function"
1913+
" to assume(false)\n"
19131914
HELP_INSERT_FINAL_ASSERT_FALSE
19141915
HELP_REPLACE_FUNCTION_BODY
19151916
HELP_RESTRICT_FUNCTION_POINTER

0 commit comments

Comments
 (0)