File tree 4 files changed +40
-0
lines changed
jbmc/regression/jbmc-strings/string-non-empty-option
4 files changed +40
-0
lines changed Original file line number Diff line number Diff line change
1
+ public class Test {
2
+
3
+ static void checkMinLength (String arg1 , String arg2 , int nondet ) {
4
+ // Filter
5
+ if (arg1 == null || arg2 == null )
6
+ return ;
7
+
8
+ // The validity of the following assertion depends on
9
+ // whether --string-non-empty is used
10
+ if (nondet == 0 ) {
11
+ assert arg1 .length () > 0 ;
12
+ } else if (nondet == 1 ) {
13
+ assert arg2 .length () > 0 ;
14
+ } else if (nondet == 2 ) {
15
+ assert arg1 .length () + arg2 .length () > 1 ;
16
+ } else {
17
+ assert arg1 .length () > 1 ;
18
+ }
19
+ }
20
+ }
Original file line number Diff line number Diff line change
1
+ CORE
2
+ Test.class
3
+ --function Test.checkMinLength
4
+ ^EXIT=0$
5
+ ^SIGNAL=0$
6
+ assertion.* line 11 function java::Test.checkMinLength.*: FAILURE
7
+ assertion.* line 13 function java::Test.checkMinLength.*: FAILURE
8
+ assertion.* line 15 function java::Test.checkMinLength.*: FAILURE
9
+ assertion.* line 17 function java::Test.checkMinLength.*: FAILURE
10
+
Original file line number Diff line number Diff line change
1
+ CORE
2
+ Test.class
3
+ --function Test.checkMinLength --string-non-empty
4
+ ^EXIT=0$
5
+ ^SIGNAL=0$
6
+ assertion.* line 11 function java::Test.checkMinLength.*: SUCCESS
7
+ assertion.* line 13 function java::Test.checkMinLength.*: SUCCESS
8
+ assertion.* line 15 function java::Test.checkMinLength.*: SUCCESS
9
+ assertion.* line 17 function java::Test.checkMinLength.*: FAILURE
10
+
You can’t perform that action at this time.
0 commit comments