Skip to content

Commit 4a06254

Browse files
author
Joel Allred
committed
Separate tests String.regionMatches
These are all skipped for now, as String.regionMatches() is not implemented.
1 parent ed168ac commit 4a06254

File tree

14 files changed

+55
-58
lines changed

14 files changed

+55
-58
lines changed
Binary file not shown.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
public class RegionMatches
2+
{
3+
public static void constant(int in)
4+
{
5+
String s3 = "Automatic Test Generation";
6+
String s4 = "automatic test generation";
7+
String s4 = "automatic test generationn";
8+
9+
// test regionMatches (case sensitive)
10+
if (in == 0)
11+
assert s3.regionMatches(0, s3, 0, 5); // should succeed
12+
else if (in == 1)
13+
assert !s3.regionMatches(0, s4, 0, 5); // should fail
14+
else if (in == 2)
15+
assert s3.regionMatches(true, 0, s4, 0, 5); // should succeed (ignore case)
16+
else if (in == 3)
17+
assert s3.regionMatches(true, 0, s5, 0, 5); // should fail (ignore case)
18+
}
19+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FUTURE
2+
RegionMatches.class
3+
--max-nondet-string-length 1000 --function RegionMatches.constant --cp `../../../../scripts/format_classpath.sh . ../../../lib/java-models-library/target/core-models.jar` --property "java::RegionMatches.constant:(I)V.assertion.1"
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
^VERIFICATION SUCCESSFUL$
7+
--
8+
--
9+
Fails because String.regionMatches is not implemented
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FUTURE
2+
RegionMatches.class
3+
--max-nondet-string-length 1000 --function RegionMatches.constant --cp `../../../../scripts/format_classpath.sh . ../../../lib/java-models-library/target/core-models.jar` --property "java::RegionMatches.constant:(I)V.assertion.2"
4+
^EXIT=10$
5+
^SIGNAL=0$
6+
^VERIFICATION FAILED$
7+
--
8+
--
9+
Fails because String.regionMatches is not implemented
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FUTURE
2+
RegionMatches.class
3+
--max-nondet-string-length 1000 --function RegionMatches.constant --cp `../../../../scripts/format_classpath.sh . ../../../lib/java-models-library/target/core-models.jar` --property "java::RegionMatches.constant:(I)V.assertion.3"
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
^VERIFICATION SUCCESSFUL$
7+
--
8+
--
9+
Fails because String.regionMatches is not implemented
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FUTURE
2+
RegionMatches.class
3+
--max-nondet-string-length 1000 --function RegionMatches.constant --cp `../../../../scripts/format_classpath.sh . ../../../lib/java-models-library/target/core-models.jar` --property "java::RegionMatches.constant:(I)V.assertion.4"
4+
^EXIT=10$
5+
^SIGNAL=0$
6+
^VERIFICATION FAILED$
7+
--
8+
--
9+
Fails because String.regionMatches is not implemented
Binary file not shown.

jbmc/regression/jbmc-strings/StringCompare01/StringCompare01.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,5 @@ public static void main(String[] args)
3131
assert s3.compareTo(s4)==-32; //true
3232

3333
assert s4.compareTo(s3)==32; //true
34-
35-
// test regionMatches (case sensitive)
36-
if (!s3.regionMatches(0, s4, 0, 5)) //true
37-
assert true;
38-
else
39-
assert false;
40-
41-
// test regionMatches (ignore case)
42-
if (s3.regionMatches(true, 0, s4, 0, 5)) //true
43-
assert true;
44-
else
45-
assert false;
4634
}
4735
}
Binary file not shown.

jbmc/regression/jbmc-strings/StringCompare02/StringCompare02.java

Lines changed: 0 additions & 14 deletions
This file was deleted.

jbmc/regression/jbmc-strings/StringCompare02/test.desc

Lines changed: 0 additions & 9 deletions
This file was deleted.
Binary file not shown.

jbmc/regression/jbmc-strings/StringCompare03/StringCompare03.java

Lines changed: 0 additions & 14 deletions
This file was deleted.

jbmc/regression/jbmc-strings/StringCompare03/test.desc

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)