use of com.oracle.truffle.api.CallTarget in project graal by oracle.
the class MethodGuardsTest method testGuardEqual.
@Test
public void testGuardEqual() {
CallTarget root = createCallTarget(GuardEqualTestFactory.getInstance());
assertEquals("do1", root.call(1));
assertEquals("do2", root.call(2));
assertEquals("do1", root.call(1));
}
use of com.oracle.truffle.api.CallTarget in project graal by oracle.
the class MethodGuardsTest method testGuardOr.
@Test
public void testGuardOr() {
CallTarget root = createCallTarget(GuardOrTestFactory.getInstance());
assertEquals("do1", root.call(1));
assertEquals("do1", root.call(0));
assertEquals("do2", root.call(2));
assertEquals("do2", root.call(-1));
}
use of com.oracle.truffle.api.CallTarget in project graal by oracle.
the class MethodGuardsTest method testGuardEqualByteInt.
@Test
public void testGuardEqualByteInt() {
CallTarget root = createCallTarget(GuardEqualByteIntTestFactory.getInstance());
assertEquals("do1", root.call((byte) 1));
assertEquals("do2", root.call((byte) 2));
assertEquals("do1", root.call((byte) 1));
}
use of com.oracle.truffle.api.CallTarget in project graal by oracle.
the class MethodGuardsTest method testGuardEqualLongInt.
@Test
public void testGuardEqualLongInt() {
CallTarget root = createCallTarget(GuardEqualLongIntTestFactory.getInstance());
assertEquals("do1", root.call(1));
assertEquals("do2", root.call(2));
assertEquals("do1", root.call(1));
}
use of com.oracle.truffle.api.CallTarget in project graal by oracle.
the class MethodGuardsTest method testGuardEqualIntLong.
@Test
public void testGuardEqualIntLong() {
CallTarget root = createCallTarget(GuardEqualIntLongTestFactory.getInstance());
assertEquals("do1", root.call(1));
assertEquals("do2", root.call(2));
assertEquals("do1", root.call(1));
}
Aggregations