use of com.oracle.truffle.api.CallTarget in project graal by oracle.
the class IntegerLiteralGuardsTest method testBinaryLiteral.
@Test
public void testBinaryLiteral() {
CallTarget root = createCallTarget(BinaryLiteralTestFactory.getInstance());
assertEquals("do1", root.call(50));
}
use of com.oracle.truffle.api.CallTarget in project graal by oracle.
the class IntegerLiteralGuardsTest method testHexLiteral.
@Test
public void testHexLiteral() {
CallTarget root = createCallTarget(HexLiteralTestFactory.getInstance());
assertEquals("do1", root.call(20));
}
use of com.oracle.truffle.api.CallTarget in project graal by oracle.
the class LimitTest method testDefaultLimit3.
@Test
public void testDefaultLimit3() {
CallTarget root = TestHelper.createCallTarget(DefaultLimit3TestFactory.getInstance());
assertEquals(42, root.call(42));
assertEquals(43, root.call(43));
assertEquals(44, root.call(44));
try {
root.call(45);
fail();
} catch (UnsupportedSpecializationException e) {
}
}
use of com.oracle.truffle.api.CallTarget in project graal by oracle.
the class LimitTest method testLocalLimit.
@Test
public void testLocalLimit() {
CallTarget root = TestHelper.createCallTarget(LocalLimitTestFactory.getInstance());
assertEquals(42, root.call(42));
assertEquals(43, root.call(43));
try {
root.call(44);
fail();
} catch (UnsupportedSpecializationException e) {
}
}
use of com.oracle.truffle.api.CallTarget in project graal by oracle.
the class MethodGuardsTest method testGuardLess.
@Test
public void testGuardLess() {
CallTarget root = createCallTarget(GuardLessTestFactory.getInstance());
assertEquals("do1", root.call(0));
assertEquals("do2", root.call(1));
assertEquals("do2", root.call(2));
assertEquals("do1", root.call(-1));
}
Aggregations