File tree 3 files changed +30
-1
lines changed
regression/goto-instrument/nondet_static_matching
3 files changed +30
-1
lines changed Original file line number Diff line number Diff line change
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
+ }
Original file line number Diff line number Diff line change
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
+ --
Original file line number Diff line number Diff line change @@ -1909,7 +1909,7 @@ void goto_instrument_parse_optionst::help()
1909
1909
" --nondet-static add nondeterministic initialization of variables with static lifetime\n " // NOLINT(*)
1910
1910
" --nondet-static-exclude e same as nondet-static except for the variable e\n " // NOLINT(*)
1911
1911
" (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(*)
1913
1913
" with static lifetime matching regex r\n "
1914
1914
" --function-enter <f>, --function-exit <f>, --branch <f>\n "
1915
1915
" instruments a call to <f> at the beginning,\n " // NOLINT(*)
You can’t perform that action at this time.
0 commit comments