somehow generate .inv() (not really robust)

This commit is contained in:
Dmitry Jemerov
2011-04-08 15:58:16 +02:00
parent 3b080bba14
commit 018bb9d701
2 changed files with 25 additions and 13 deletions
@@ -398,8 +398,9 @@ public class NamespaceGenTest extends LightCodeInsightFixtureTestCase {
binOpTest("fun foo(a: Int, b: Int): Int = a xor b", 0x70, 0x1f, 0x6f);
}
public void _testBitInv() throws Exception {
loadText("fun foo(a: Int): Int = ~a");
public void testBitInv() throws Exception {
loadText("fun foo(a: Int): Int = a.inv()");
System.out.println(generateToText());
final Method main = generateFunction();
assertEquals(0xffff0000, main.invoke(null, 0x0000ffff));
}