Skip to content

Commit 6fe89b4

Browse files
romainbrenguierLukasz A.J. Wrona
authored andcommitted
Tests for new option string-max-input-length
1 parent 0dc28f3 commit 6fe89b4

File tree

5 files changed

+28
-4
lines changed

5 files changed

+28
-4
lines changed
Binary file not shown.
Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
public class Test {
22
public static void main(String s) {
3-
// Causes this function to be ignored if string-max-length is
4-
// less than 40
5-
String t = new String("0123456789012345678901234567890123456789");
6-
assert s.length() < 30;
3+
// This prevent anything from happening if string-max-length is smaller
4+
// than 40
5+
String t = new String("0123456789012345678901234567890123456789");
6+
if (s.length() >= 30)
7+
// This should not happen when string-max-input length is smaller
8+
// than 30
9+
assert false;
710
}
811
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
CORE
2+
Test.class
3+
--refine-strings --string-max-length 30
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
^VERIFICATION SUCCESSFUL$
7+
--
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
CORE
2+
Test.class
3+
--refine-strings --string-max-length 45 --string-max-input-length 31
4+
^EXIT=10$
5+
^SIGNAL=0$
6+
^VERIFICATION FAILED$
7+
--
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
CORE
2+
Test.class
3+
--refine-strings --string-max-length 45 --string-max-input-length 20
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
^VERIFICATION SUCCESSFUL$
7+
--

0 commit comments

Comments
 (0)