use of com.oracle.truffle.api.dsl.test.examples.ExampleNode.ExampleArgumentNode in project graal by oracle.
the class ImplicitCastTest method testImplicitCastExecute2.
@Test
public void testImplicitCastExecute2() {
ExampleArgumentNode[] args = ExampleNode.createArguments(2);
CallTarget target = ExampleNode.createTarget(ImplicitCastExecuteNodeGen.create(args));
Assert.assertEquals("s2", target.call(1L, 1L));
Assert.assertEquals(0, args[0].longInvocationCount);
Assert.assertEquals(0, args[1].longInvocationCount);
Assert.assertEquals(1, args[0].genericInvocationCount);
Assert.assertEquals(1, args[1].genericInvocationCount);
Assert.assertEquals("s2", target.call(1L, 1L));
Assert.assertEquals(1, args[0].longInvocationCount);
Assert.assertEquals(1, args[1].longInvocationCount);
Assert.assertEquals(2, args[0].genericInvocationCount);
Assert.assertEquals(2, args[1].genericInvocationCount);
Assert.assertEquals("s2", target.call(1L, 1L));
Assert.assertEquals(2, args[0].longInvocationCount);
Assert.assertEquals(2, args[1].longInvocationCount);
Assert.assertEquals(3, args[0].genericInvocationCount);
Assert.assertEquals(3, args[1].genericInvocationCount);
Assert.assertEquals(0, args[0].doubleInvocationCount);
Assert.assertEquals(0, args[1].doubleInvocationCount);
Assert.assertEquals(0, args[0].intInvocationCount);
Assert.assertEquals(0, args[1].intInvocationCount);
}
Aggregations