ASM is smart enough to put all kinds of constants on stack, no need for custom logic

This commit is contained in:
Dmitry Jemerov
2011-04-07 15:06:17 +02:00
parent 2781aa18ff
commit cd3ed17e25
2 changed files with 7 additions and 12 deletions
@@ -269,6 +269,12 @@ public class NamespaceGenTest extends LightCodeInsightFixtureTestCase {
Byte.valueOf((byte) 126), Byte.valueOf((byte) 127), 1);
}
public void testBooleanConstant() throws Exception {
loadText("fun foo(): Boolean = true");
final Method main = generateFunction();
assertEquals(true, main.invoke(null));
}
private void binOpTest(final String text, final Object arg1, final Object arg2, final Object expected) throws Exception {
loadText(text);
System.out.println(generateToText());