forked from diffblue/cbmc
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request diffblue#2038 from romainbrenguier/bugfix/assign-a…
…t-malloc-site [TG-3173] Assign Strings at malloc site in java object factory
- Loading branch information
Showing
5 changed files
with
42 additions
and
6 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
public class Test { | ||
|
||
public static String check(String[] array) { | ||
// Filter | ||
if(array == null) | ||
return "null array"; | ||
if(array.length < 2) | ||
return "too short"; | ||
if(array[0] == null) | ||
return "null string"; | ||
|
||
// Arrange | ||
String s0 = array[0]; | ||
String s1 = array[1]; | ||
|
||
// Act | ||
boolean b = s0.equals(s1); | ||
|
||
// Assert | ||
assert(s0 != null); | ||
assert(!b); | ||
|
||
// Return | ||
return s0 + s1; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
CORE | ||
Test.class | ||
--refine-strings --function Test.check --string-max-input-length 1000 | ||
^EXIT=10$ | ||
^SIGNAL=0$ | ||
^\[.*assertion\.1\].* line 20.* SUCCESS$ | ||
^\[.*assertion\.2\].* line 21.* FAILURE$ | ||
-- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters