Skip to content

Commit 4440343

Browse files
Adding tests for String.valueOf(long)
1 parent eaad100 commit 4440343

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CORE
2+
test.class
3+
--refine-strings
4+
^EXIT=10$
5+
^SIGNAL=0$
6+
assertion.* file test.java line 11 .* SUCCESS$
7+
assertion.* file test.java line 16 .* FAILURE$
8+
--
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
public class test
2+
{
3+
public static void main(int i)
4+
{
5+
long l1=12345678901234L;
6+
if(i == 0)
7+
{
8+
String s = String.valueOf(l1);
9+
assert(s.equals("12345678901234"));
10+
}
11+
else
12+
{
13+
String s = String.valueOf(-l1);
14+
assert(!s.equals("-12345678901234"));
15+
}
16+
}
17+
}

0 commit comments

Comments
 (0)