Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
16 changes: 16 additions & 0 deletions jbmc/regression/jbmc-strings/StringBuilderAppend03/test.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
public class test
{
public static void nondet(String stringArg)
{
StringBuilder sb = new StringBuilder(stringArg);
sb.append("Z");
String s = sb.toString();
if (s.startsWith("fg")) {
assert false;
} else if (s.endsWith("Z")) {
assert false;
} else {
assert false;
}
}
}
10 changes: 10 additions & 0 deletions jbmc/regression/jbmc-strings/StringBuilderAppend03/test1.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
CORE
test.class
--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"
^EXIT=10$
^SIGNAL=0$
\[.*assertion\.1\] .* line 9 .* FAILURE
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about the other two assertions?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm testing per-property, so the other assertions are checked in the two other desc files. Is that what you mean?

^VERIFICATION FAILED$
--
--
Check that StringBuilder.append() is correct when the base String is an input.
10 changes: 10 additions & 0 deletions jbmc/regression/jbmc-strings/StringBuilderAppend03/test2.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
CORE
test.class
--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"
^EXIT=10$
^SIGNAL=0$
\[.*assertion\.2\] .* line 11.* FAILURE
^VERIFICATION FAILED$
--
--
Check that StringBuilder.append() is correct when the base String is an input.
10 changes: 10 additions & 0 deletions jbmc/regression/jbmc-strings/StringBuilderAppend03/test3.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
CORE symex-driven-lazy-loading-expected-failure
test.class
--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"
^EXIT=0$
^SIGNAL=0$
\[.*assertion\.3\] .* line 13.* SUCCESS
^VERIFICATION SUCCESSFUL$
--
--
Check that StringBuilder.append() is correct when the base String is an input.
Binary file not shown.
8 changes: 0 additions & 8 deletions jbmc/regression/jbmc-strings/bug-test-gen-095/test.desc

This file was deleted.

10 changes: 0 additions & 10 deletions jbmc/regression/jbmc-strings/bug-test-gen-095/test.java

This file was deleted.