Skip to content

Commit 03e547e

Browse files
committed
TO int f() { return 'c' } returns string
1 parent ea2e8f2 commit 03e547e

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

sources/net.sf.j2s.core/test/src/test/Test_Ints.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,23 @@
33
public class Test_Ints {
44

55
public Test_Ints(float... floats){
6-
System.out.println("Test_int(float...) - FAILED");
6+
System.out.println("Test_int(float...) - " + (floats[0] != (int) floats[0]));
77
};
88

99
public Test_Ints(int... ints){
10-
System.out.println("Test_int(int...) - PASSED");
10+
System.out.println("Test_int(int...) - " + (ints.length == 0 || ints[0] == 3));
1111
};
1212

1313
public static void main(String[] args) {
1414
new Test_Ints();
1515
new Test_Ints(3,5,6);
1616
new Test_Ints(3.5f,5.5f,6.5f);
17+
System.out.println(getIntFromChar('c') == 99);
18+
}
19+
20+
private static int getIntFromChar(char c) {
21+
return c;
22+
23+
FAILS
1724
}
1825
}

0 commit comments

Comments
 (0)