Skip to content

Commit 939fb87

Browse files
committed
Added regression tests based on originating test-gen tests
The relevant tests implemented in diffblue/test-gen/pull/479 (StringContains3 and StringContains4) for test-gen have been adapted and added as StringContains01 and StringContains02 resp. They have been marked as future in accordance to the standard for other tests. A contains smoke test already exists and is active, which was extended.
1 parent 8495451 commit 939fb87

File tree

9 files changed

+38
-4
lines changed

9 files changed

+38
-4
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
CORE
22
test_contains.class
33
--refine-strings
4-
^EXIT=0$
4+
^EXIT=10$
55
^SIGNAL=0$
66
^\[.*assertion.1\].* line 8.* SUCCESS$
7+
^\[.*assertion.2\].* line 9.* SUCCESS$
8+
^\[.*assertion.3\].* line 12.* FAILURE$
9+
^\[.*assertion.4\].* line 13.* FAILURE$
10+
^VERIFICATION FAILED$
711
--
812
Issue: diffblue/test-gen#201
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
public class test_contains
22
{
3-
public static void main(/*String[] argv*/)
3+
public static void main(String x)
44
{
55
String s = new String("Abc");
66
String u = "bc";
77
String t = "ab";
88
assert(s.contains(u));
9-
// Long version:
10-
// assert(s.contains(t));
9+
assert(!s.contains(t));
10+
11+
String z = new String(x);
12+
if (z.length() > 3) assert(t.contains(z));
13+
else assert(z.contains(u));
1114
}
1215
}
618 Bytes
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FUTURE
2+
test.class
3+
--refine-strings
4+
^EXIT=10$
5+
^SIGNAL=0$
6+
^VERIFICATION FAILED$
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
public class test
2+
{
3+
public static void main(String s)
4+
{
5+
String ab = "abc";
6+
assert(ab.contains(s));
7+
}
8+
}
606 Bytes
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FUTURE
2+
test.class
3+
--refine-strings
4+
^EXIT=10$
5+
^SIGNAL=0$
6+
^VERIFICATION FAILED$
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
public class test
2+
{
3+
public static void main(String s)
4+
{
5+
assert(s.contains("Hello"));
6+
}
7+
}

0 commit comments

Comments
 (0)