diff --git a/idea/tests/org/jetbrains/jet/codegen/PrimitiveTypesTest.java b/idea/tests/org/jetbrains/jet/codegen/PrimitiveTypesTest.java index 76d7f37fc09..16f256eb009 100644 --- a/idea/tests/org/jetbrains/jet/codegen/PrimitiveTypesTest.java +++ b/idea/tests/org/jetbrains/jet/codegen/PrimitiveTypesTest.java @@ -34,15 +34,17 @@ public class PrimitiveTypesTest extends CodegenTestCase { } public void testNE() throws Exception { - final String code = "fun foo(a: Int, b: Int): Int = if (a != b) 1 else 0"; - binOpTest(code, 5, 5, 0); - binOpTest(code, 5, 3, 1); + loadText("fun foo(a: Int, b: Int): Int = if (a != b) 1 else 0"); + final Method main = generateFunction(); + assertEquals(0, main.invoke(null, 5, 5)); + assertEquals(1, main.invoke(null, 5, 3)); } public void testGE() throws Exception { - final String code = "fun foo(a: Int, b: Int): Int = if (a >= b) 1 else 0"; - binOpTest(code, 5, 5, 1); - binOpTest(code, 3, 5, 0); + loadText("fun foo(a: Int, b: Int): Int = if (a >= b) 1 else 0"); + final Method main = generateFunction(); + assertEquals(1, main.invoke(null, 5, 5)); + assertEquals(0, main.invoke(null, 3, 5)); } public void testReturnCmp() throws Exception {