Skip to content

Commit 571a720

Browse files
committed
Shortened the string contains test.
After a change that deleted the constant unfolding for existential axioms (due to being incorrect), this smoke test is too slow. The original code was kept because previously it was there to trigger bugged behaviour that was subsequently fixed.
1 parent 657ca67 commit 571a720

File tree

4 files changed

+14
-15
lines changed

4 files changed

+14
-15
lines changed
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
CORE
22
test_contains.class
33
--refine-strings --string-max-length 100
4-
^EXIT=10$
4+
^EXIT=0$
55
^SIGNAL=0$
66
^\[.*assertion.1\].* line 8.* SUCCESS$
77
^\[.*assertion.2\].* line 9.* SUCCESS$
8-
^\[.*assertion.3\].* line 12.* FAILURE$
9-
^\[.*assertion.4\].* line 13.* FAILURE$
10-
^VERIFICATION FAILED$
8+
^VERIFICATION SUCCESSFUL$
9+
--
1110
--
1211
Issue: diffblue/test-gen#201
Binary file not shown.

regression/strings-smoke-tests/java_contains/test_contains.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ public static void main(String x)
88
assert(s.contains(u));
99
assert(!s.contains(t));
1010

11-
String z = new String(x);
12-
if (z.length() > 3)
13-
assert(t.contains(z));
14-
else
15-
assert(z.contains(u));
11+
// Too slow now after constant unfolding was deleted due to invalidity.
12+
// May be fast enough in the future though.
13+
// String z = new String(x);
14+
// if (z.length() > 3)
15+
// assert(t.contains(z));
16+
// else
17+
// assert(z.contains(u));
1618
}
1719
}

regression/strings-smoke-tests/java_contains/test_string_printable.desc

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
KNOWNBUG
2-
test_string_printable.class
3-
--refine-strings --string-printable
4-
^EXIT=10$
2+
test_contains.class
3+
--refine-strings --string-max-length 100 --string-printable
4+
^EXIT=0$
55
^SIGNAL=0$
66
^\[.*assertion.1\].* line 8.* SUCCESS$
77
^\[.*assertion.2\].* line 9.* SUCCESS$
8-
^\[.*assertion.3\].* line 12.* FAILURE$
9-
^\[.*assertion.4\].* line 13.* FAILURE$
10-
^VERIFICATION FAILED$
8+
^VERIFICATION SUCCESSFUL$
119
--
1210
--
1311
This should create a huge formula and run out of memory.

0 commit comments

Comments
 (0)