We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d1227be commit 5a683e9Copy full SHA for 5a683e9
regression/jbmc-strings/StringContains03/Test.class
779 Bytes
regression/jbmc-strings/StringContains03/Test.java
@@ -0,0 +1,23 @@
1
+public class Test {
2
+ public static String check(String s) {
3
+ // Filter
4
+ if (s == null) {
5
+ return "Null string";
6
+ }
7
+ if (s.length() < 16_000_000) {
8
+ return "Too short";
9
10
+
11
+ // Act
12
+ boolean b1 = s.contains("foobar");
13
14
+ // Filter output
15
+ if (b1) {
16
+ return "Contained";
17
18
19
+ // Assert
20
+ assert(false);
21
+ return "Unreachable";
22
23
+}
regression/jbmc-strings/StringContains03/test.desc
@@ -0,0 +1,10 @@
+Test.class
+--refine-strings --function Test.check
+^EXIT=10$
+^SIGNAL=0$
+^VERIFICATION FAILED$
+file Test.java line 20 .*: FAILURE$
+--
+--string-max-length is not used on purpose, because this tests the behaviour
+of string refinement on very large strings.
0 commit comments