Search in sources :

Example 1 with TVMCI

use of com.oracle.truffle.api.impl.TVMCI in project graal by oracle.

the class TruffleRuntimeTest method testGetTVMCI.

@Test
public void testGetTVMCI() {
    TruffleRuntime runtime = Truffle.getRuntime();
    TVMCI tvmci = runtime.getCapability(TVMCI.class);
    assertNotNull("Truffle Virtual Machine Compiler Interface not found", tvmci);
    assertEquals("GraalTVMCI", tvmci.getClass().getSimpleName());
    abstract class TVMCISubclass extends TVMCI {
    }
    TVMCISubclass subclass = runtime.getCapability(TVMCISubclass.class);
    assertNull("Expected null return value for TVMCI subclass", subclass);
}
Also used : TVMCI(com.oracle.truffle.api.impl.TVMCI) DefaultTruffleRuntime(com.oracle.truffle.api.impl.DefaultTruffleRuntime) TruffleRuntime(com.oracle.truffle.api.TruffleRuntime) Test(org.junit.Test)

Aggregations

TruffleRuntime (com.oracle.truffle.api.TruffleRuntime)1 DefaultTruffleRuntime (com.oracle.truffle.api.impl.DefaultTruffleRuntime)1 TVMCI (com.oracle.truffle.api.impl.TVMCI)1 Test (org.junit.Test)1