File tree Expand file tree Collapse file tree 8 files changed +80
-0
lines changed
jbmc/regression/jbmc-strings
ConstantEvaluationStringBufferAppend04-Object
ConstantEvaluationStringBuilderAppend04-Object Expand file tree Collapse file tree 8 files changed +80
-0
lines changed Original file line number Diff line number Diff line change 1+ public class Test
2+ {
3+ public void testSuccess ()
4+ {
5+ StringBuffer sb = new StringBuffer ("abc" );
6+ Integer i = new Integer (3 );
7+ sb .append (i );
8+ assert sb .toString ().equals ("abc3" );
9+
10+ sb .append ((Object )"xyz" );
11+ assert sb .toString ().equals ("abc3xyz" );
12+
13+ sb .append ((Object )null );
14+ assert sb .toString ().equals ("abc3xyznull" );
15+ }
16+
17+ public void testNoPropagation (Object obj )
18+ {
19+ StringBuffer sb = new StringBuffer ();
20+ assert obj .toString ().equals ("" );
21+ }
22+ }
Original file line number Diff line number Diff line change 1+ CORE symex-driven-lazy-loading-expected-failure
2+ Test.class
3+ --function Test.testNoPropagation --cp `../../../../scripts/format_classpath.sh . ../../../lib/java-models-library/target/core-models.jar` --property 'java::Test.testNoPropagation:(Ljava/lang/Object;)V.assertion.1'
4+ ^Generated [0-9]+ VCC\(s\), 1 remaining after simplification$
5+ ^EXIT=10$
6+ ^SIGNAL=0$
7+ ^VERIFICATION FAILED$
8+ --
9+ --
Original file line number Diff line number Diff line change 1+ CORE
2+ Test.class
3+ --function Test.testSuccess --cp `../../../../scripts/format_classpath.sh . ../../../lib/java-models-library/target/core-models.jar`
4+ ^Generated [0-9]+ VCC\(s\), 0 remaining after simplification$
5+ ^EXIT=0$
6+ ^SIGNAL=0$
7+ ^VERIFICATION SUCCESSFUL$
8+ --
9+ --
Original file line number Diff line number Diff line change 1+ public class Test
2+ {
3+ public void testSuccess ()
4+ {
5+ StringBuilder sb = new StringBuilder ("abc" );
6+ Integer i = new Integer (3 );
7+ sb .append (i );
8+ assert sb .toString ().equals ("abc3" );
9+
10+ sb .append ((Object )"xyz" );
11+ assert sb .toString ().equals ("abc3xyz" );
12+
13+ sb .append ((Object )null );
14+ assert sb .toString ().equals ("abc3xyznull" );
15+ }
16+
17+ public void testNoPropagation (Object obj )
18+ {
19+ StringBuilder sb = new StringBuilder ();
20+ assert obj .toString ().equals ("" );
21+ }
22+ }
Original file line number Diff line number Diff line change 1+ CORE symex-driven-lazy-loading-expected-failure
2+ Test.class
3+ --function Test.testNoPropagation --cp `../../../../scripts/format_classpath.sh . ../../../lib/java-models-library/target/core-models.jar` --property 'java::Test.testNoPropagation:(Ljava/lang/Object;)V.assertion.1'
4+ ^Generated [0-9]+ VCC\(s\), 1 remaining after simplification$
5+ ^EXIT=10$
6+ ^SIGNAL=0$
7+ ^VERIFICATION FAILED$
8+ --
9+ --
Original file line number Diff line number Diff line change 1+ CORE
2+ Test.class
3+ --function Test.testSuccess --cp `../../../../scripts/format_classpath.sh . ../../../lib/java-models-library/target/core-models.jar`
4+ ^Generated [0-9]+ VCC\(s\), 0 remaining after simplification$
5+ ^EXIT=0$
6+ ^SIGNAL=0$
7+ ^VERIFICATION SUCCESSFUL$
8+ --
9+ --
You can’t perform that action at this time.
0 commit comments