comparison truffle/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/SLTckTest.java @ 22168:ffadd23c63c8

Introducing Portaal into the isolated world of each and any TruffleLanguage.
author Jaroslav Tulach <jaroslav.tulach@oracle.com>
date Mon, 14 Sep 2015 05:32:13 +0200
parents 92906003d607
children 796f0fef110e
comparison
equal deleted inserted replaced
22140:92906003d607 22168:ffadd23c63c8
40 */ 40 */
41 package com.oracle.truffle.sl.test; 41 package com.oracle.truffle.sl.test;
42 42
43 import com.oracle.truffle.api.source.Source; 43 import com.oracle.truffle.api.source.Source;
44 import com.oracle.truffle.tck.TruffleTCK; 44 import com.oracle.truffle.tck.TruffleTCK;
45 import com.oracle.truffle.api.vm.TruffleVM; 45 import com.oracle.truffle.api.vm.Portaal;
46 import static org.junit.Assert.*; 46 import static org.junit.Assert.*;
47 import org.junit.Test; 47 import org.junit.Test;
48 48
49 /** 49 /**
50 * This is the way to verify your language implementation is compatible. 50 * This is the way to verify your language implementation is compatible.
51 * 51 *
52 */ 52 */
53 public class SLTckTest extends TruffleTCK { 53 public class SLTckTest extends TruffleTCK {
54 @Test 54 @Test
55 public void testVerifyPresence() { 55 public void testVerifyPresence() {
56 TruffleVM vm = TruffleVM.newVM().build(); 56 Portaal vm = Portaal.createNew().build();
57 assertTrue("Our language is present", vm.getLanguages().containsKey("application/x-sl")); 57 assertTrue("Our language is present", vm.getLanguages().containsKey("application/x-sl"));
58 } 58 }
59 59
60 @Override 60 @Override
61 protected TruffleVM prepareVM() throws Exception { 61 protected Portaal prepareVM() throws Exception {
62 TruffleVM vm = TruffleVM.newVM().build(); 62 Portaal vm = Portaal.createNew().build();
63 // @formatter:off 63 // @formatter:off
64 vm.eval( 64 vm.eval(
65 Source.fromText( 65 Source.fromText(
66 "function fourtyTwo() {\n" + 66 "function fourtyTwo() {\n" +
67 " return 42;\n" + // 67 " return 42;\n" + //