Skip to content

Commit 15e88e7

Browse files
Making tests for int to string conversion more precise
We include both assertion that should hold and some that should fail.
1 parent 8a80310 commit 15e88e7

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
CORE
22
test_int.class
33
--refine-strings
4-
^EXIT=0$
4+
^EXIT=10$
55
^SIGNAL=0$
6-
^VERIFICATION SUCCESSFUL$
6+
assertion.* file test_int.java line 6 .* SUCCESS$
7+
assertion.* file test_int.java line 9 .* SUCCESS$
8+
assertion.* file test_int.java line 11 .* FAILURE$
9+
assertion.* file test_int.java line 13 .* FAILURE$
710
--
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
public class test_int
22
{
3-
public static void main(/*String[] argv*/)
3+
public static void main(int i)
44
{
55
String s = Integer.toString(12);
66
assert(s.equals("12"));
77
String t = Integer.toString(-23);
88
System.out.println(t);
99
assert(t.equals("-23"));
10+
if(i==1)
11+
assert(!s.equals("12"));
12+
else if(i==2)
13+
assert(!t.equals("-23"));
1014
}
1115
}

0 commit comments

Comments
 (0)