Skip to content

Commit 22152fc

Browse files
peterschrammelgiulio-garbi
authored andcommitted
Move test --nondet-static-matching option from cbmc to goto-instrument
1 parent 02224b3 commit 22152fc

File tree

3 files changed

+30
-1
lines changed

3 files changed

+30
-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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1909,7 +1909,7 @@ void goto_instrument_parse_optionst::help()
19091909
" --nondet-static add nondeterministic initialization of variables with static lifetime\n" // NOLINT(*)
19101910
" --nondet-static-exclude e same as nondet-static except for the variable e\n" //NOLINT(*)
19111911
" (use multiple times if required)\n"
1912-
" --nondet-static-matching r add nondeterministic initialization of variables\n"
1912+
" --nondet-static-matching r add nondeterministic initialization of variables\n" // NOLINT(*)
19131913
" with static lifetime matching regex r\n"
19141914
" --function-enter <f>, --function-exit <f>, --branch <f>\n"
19151915
" instruments a call to <f> at the beginning,\n" // NOLINT(*)

0 commit comments

Comments
 (0)