Skip to content

Commit 103b2dc

Browse files
authored
Merge pull request #4939 from yumibagge/yb/jbmc-regression-tg-8284
Add regression tests for [TG-8284]
2 parents 455e8f9 + 5352996 commit 103b2dc

File tree

34 files changed

+101
-52
lines changed

34 files changed

+101
-52
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
public class Main {
2+
3+
public void constantIndexOf() {
4+
String s1 = "abcabc";
5+
String s2 = "bc";
6+
assert s1.indexOf(s2) == 1;
7+
assert s1.indexOf(s2, -10) == 1;
8+
assert s1.indexOf("") == 0;
9+
assert s1.indexOf(s2, 3) == 4;
10+
assert s1.indexOf("cd") == -1;
11+
assert s1.indexOf(s2, 10) == -1;
12+
assert s1.indexOf("", 10) == -1;
13+
}
14+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
CORE symex-driven-lazy-loading-expected-failure
2+
Main.class
3+
--function Main.constantIndexOf --cp `../../../../scripts/format_classpath.sh . ../../../lib/java-models-library/target/core-models.jar`
4+
^Generated [0-9]+ VCC\(s\), 0 remaining after simplification$
5+
^VERIFICATION SUCCESSFUL$
6+
^EXIT=0$
7+
^SIGNAL=0$
8+
--
9+
--
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
public class Main {
2+
3+
public void constantIndexOf() {
4+
String s1 = "abcabc";
5+
assert s1.indexOf('b') == 1;
6+
assert s1.indexOf('b', -10) == 1;
7+
assert s1.indexOf('b', 3) == 4;
8+
assert s1.indexOf('d') == -1;
9+
assert s1.indexOf('b', 10) == -1;
10+
}
11+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
public class Main {
2+
3+
public void constantIndexOf(String arg) {
4+
String s1 = "abcabc";
5+
assert s1.indexOf(arg, 10) == -1;
6+
}
7+
}

0 commit comments

Comments
 (0)