Skip to content

Commit

Permalink
Tests for new option string-max-input-length
Browse files Browse the repository at this point in the history
  • Loading branch information
romainbrenguier authored and Lukasz A.J. Wrona committed Sep 18, 2017
1 parent 440d19f commit 621da87
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 0 deletions.
Binary file not shown.
11 changes: 11 additions & 0 deletions regression/strings-smoke-tests/max_input_length/Test.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
public class Test {
public static void main(String s) {
// This prevent anything from happening if string-max-length is smaller
// than 40
String t = new String("0123456789012345678901234567890123456789");
if (s.length() >= 30)
// This should not happen when string-max-input length is smaller
// than 30
assert false;
}
}
7 changes: 7 additions & 0 deletions regression/strings-smoke-tests/max_input_length/test.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
CORE
Test.class
--refine-strings --string-max-length 30
^EXIT=0$
^SIGNAL=0$
^VERIFICATION SUCCESSFUL$
--
7 changes: 7 additions & 0 deletions regression/strings-smoke-tests/max_input_length/test1.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
CORE
Test.class
--refine-strings --string-max-length 45 --string-max-input-length 31
^EXIT=10$
^SIGNAL=0$
^VERIFICATION FAILED$
--
7 changes: 7 additions & 0 deletions regression/strings-smoke-tests/max_input_length/test2.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
CORE
Test.class
--refine-strings --string-max-length 45 --string-max-input-length 20
^EXIT=0$
^SIGNAL=0$
^VERIFICATION SUCCESSFUL$
--

0 comments on commit 621da87

Please sign in to comment.