File tree 10 files changed +101
-0
lines changed
jbmc/regression/jbmc-strings
StringBuilderSubstringConstantEvaluation3
StringSubstringConstantEvaluation3
10 files changed +101
-0
lines changed Original file line number Diff line number Diff line change
1
+ public class Main {
2
+ public void test1 () {
3
+ StringBuilder sb = new StringBuilder ("abc" );
4
+ sb .substring (-1 );
5
+ }
6
+
7
+ public void test2 () {
8
+ StringBuilder sb = new StringBuilder ("abc" );
9
+ sb .substring (4 );
10
+ }
11
+
12
+ public void test3 () {
13
+ StringBuilder sb = new StringBuilder ("abc" );
14
+ sb .substring (-1 , 4 );
15
+ }
16
+ }
Original file line number Diff line number Diff line change
1
+ FUTURE
2
+ Main.class
3
+ --function Main.test1 --cp `../../../../scripts/format_classpath.sh . ../../../lib/java-models-library/target/core-models.jar`
4
+ ^Generated [1-9][0-9]* VCC\(s\), 1 remaining after simplification$
5
+ ^EXIT=10$
6
+ ^SIGNAL=0$
7
+ no uncaught exception: FAILURE
8
+ ^VERIFICATION FAILED$
9
+ --
10
+ --
11
+ This test will pass once a model for StringBuilder.substring() exists that
12
+ throws an exception when the index is greater or equal to the length of the
13
+ string.
Original file line number Diff line number Diff line change
1
+ FUTURE
2
+ Main.class
3
+ --function Main.test2 --cp `../../../../scripts/format_classpath.sh . ../../../lib/java-models-library/target/core-models.jar`
4
+ ^Generated [1-9][0-9]* VCC\(s\), 1 remaining after simplification$
5
+ ^EXIT=10$
6
+ ^SIGNAL=0$
7
+ no uncaught exception: FAILURE
8
+ ^VERIFICATION FAILED$
9
+ --
10
+ --
11
+ This test will pass once a model for StringBuilder.substring() exists that
12
+ throws an exception when the index is greater or equal to the length of the
13
+ string.
Original file line number Diff line number Diff line change
1
+ FUTURE
2
+ Main.class
3
+ --function Main.test3 --cp `../../../../scripts/format_classpath.sh . ../../../lib/java-models-library/target/core-models.jar`
4
+ ^Generated [1-9][0-9]* VCC\(s\), 1 remaining after simplification$
5
+ ^EXIT=10$
6
+ ^SIGNAL=0$
7
+ no uncaught exception: FAILURE
8
+ ^VERIFICATION FAILED$
9
+ --
10
+ --
11
+ This test will pass once a model for StringBuilder.substring() exists that
12
+ throws an exception when the index is greater or equal to the length of the
13
+ string.
Original file line number Diff line number Diff line change
1
+ public class Main {
2
+ public void test1 () {
3
+ String s1 = "abc" ;
4
+ s1 .substring (-1 );
5
+ }
6
+
7
+ public void test2 () {
8
+ String s1 = "abc" ;
9
+ s1 .substring (4 );
10
+ }
11
+
12
+ public void test3 () {
13
+ String s1 = "abc" ;
14
+ s1 .substring (-1 , 4 );
15
+ }
16
+ }
Original file line number Diff line number Diff line change
1
+ CORE
2
+ Main.class
3
+ --function Main.test1 --cp `../../../../scripts/format_classpath.sh . ../../../lib/java-models-library/target/core-models.jar`
4
+ ^Generated [1-9][0-9]* VCC\(s\), 1 remaining after simplification$
5
+ ^EXIT=10$
6
+ ^SIGNAL=0$
7
+ no uncaught exception: FAILURE
8
+ ^VERIFICATION FAILED$
9
+ --
10
+ --
Original file line number Diff line number Diff line change
1
+ CORE
2
+ Main.class
3
+ --function Main.test2 --cp `../../../../scripts/format_classpath.sh . ../../../lib/java-models-library/target/core-models.jar`
4
+ ^Generated [1-9][0-9]* VCC\(s\), 1 remaining after simplification$
5
+ ^EXIT=10$
6
+ ^SIGNAL=0$
7
+ no uncaught exception: FAILURE
8
+ ^VERIFICATION FAILED$
9
+ --
10
+ --
Original file line number Diff line number Diff line change
1
+ CORE
2
+ Main.class
3
+ --function Main.test3 --cp `../../../../scripts/format_classpath.sh . ../../../lib/java-models-library/target/core-models.jar`
4
+ ^Generated [1-9][0-9]* VCC\(s\), 1 remaining after simplification$
5
+ ^EXIT=10$
6
+ ^SIGNAL=0$
7
+ no uncaught exception: FAILURE
8
+ ^VERIFICATION FAILED$
9
+ --
10
+ --
You can’t perform that action at this time.
0 commit comments