boxing for constants
This commit is contained in:
@@ -221,12 +221,18 @@ public class NamespaceGenTest extends LightCodeInsightFixtureTestCase {
|
||||
assertEquals(239, main.invoke(null, new Object[]{null}));
|
||||
}
|
||||
|
||||
public void testBoxingInCall() throws Exception {
|
||||
public void testIntBoxed() throws Exception {
|
||||
loadText("fun foo(s: String): Int? = Integer.getInteger(s, 239)");
|
||||
final Method main = generateFunction();
|
||||
assertEquals(239, main.invoke(null, "no.such.system.property"));
|
||||
}
|
||||
|
||||
public void testBoxConstant() throws Exception {
|
||||
loadText("fun foo(): Int? = 239");
|
||||
final Method main = generateFunction();
|
||||
assertEquals(239, main.invoke(null));
|
||||
}
|
||||
|
||||
public void testLong() throws Exception {
|
||||
loadText("fun foo(a: Long, b: Long): Long = a + b");
|
||||
System.out.println(generateToText());
|
||||
|
||||
Reference in New Issue
Block a user