Skip to content

Commit b41cc10

Browse files
author
Joel Allred
authored
Merge pull request #4862 from allredj/clean-up/enable-string-test
Clean up/enable StringBuilder.append tests
2 parents df6190e + 62ceb1b commit b41cc10

File tree

8 files changed

+46
-18
lines changed

8 files changed

+46
-18
lines changed
877 Bytes
Binary file not shown.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
public class test
2+
{
3+
public static void nondet(String stringArg)
4+
{
5+
StringBuilder sb = new StringBuilder(stringArg);
6+
sb.append("Z");
7+
String s = sb.toString();
8+
if (s.startsWith("fg")) {
9+
assert false;
10+
} else if (s.endsWith("Z")) {
11+
assert false;
12+
} else {
13+
assert false;
14+
}
15+
}
16+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
CORE
2+
test.class
3+
--function test.nondet --max-nondet-string-length 1000 --cp `../../../../scripts/format_classpath.sh . ../../../lib/java-models-library/target/core-models.jar` --property "java::test.nondet:(Ljava/lang/String;)V.assertion.1"
4+
^EXIT=10$
5+
^SIGNAL=0$
6+
\[.*assertion\.1\] .* line 9 .* FAILURE
7+
^VERIFICATION FAILED$
8+
--
9+
--
10+
Check that StringBuilder.append() is correct when the base String is an input.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
CORE
2+
test.class
3+
--function test.nondet --max-nondet-string-length 1000 --cp `../../../../scripts/format_classpath.sh . ../../../lib/java-models-library/target/core-models.jar` --property "java::test.nondet:(Ljava/lang/String;)V.assertion.2"
4+
^EXIT=10$
5+
^SIGNAL=0$
6+
\[.*assertion\.2\] .* line 11.* FAILURE
7+
^VERIFICATION FAILED$
8+
--
9+
--
10+
Check that StringBuilder.append() is correct when the base String is an input.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
CORE symex-driven-lazy-loading-expected-failure
2+
test.class
3+
--function test.nondet --max-nondet-string-length 1000 --cp `../../../../scripts/format_classpath.sh . ../../../lib/java-models-library/target/core-models.jar` --property "java::test.nondet:(Ljava/lang/String;)V.assertion.3"
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
\[.*assertion\.3\] .* line 13.* SUCCESS
7+
^VERIFICATION SUCCESSFUL$
8+
--
9+
--
10+
Check that StringBuilder.append() is correct when the base String is an input.
-822 Bytes
Binary file not shown.

jbmc/regression/jbmc-strings/bug-test-gen-095/test.desc

Lines changed: 0 additions & 8 deletions
This file was deleted.

jbmc/regression/jbmc-strings/bug-test-gen-095/test.java

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)