Mercurial > hg > truffle
comparison truffle/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/SLTestRunner.java @ 22104:cf19259edf87
TruffleVM.eval and Source.withMimeType
author | Jaroslav Tulach <jaroslav.tulach@oracle.com> |
---|---|
date | Mon, 24 Aug 2015 08:46:21 +0200 |
parents | 503529c65456 |
children | dc83cc1f94f2 ffadd23c63c8 |
comparison
equal
deleted
inserted
replaced
22103:7646278cca8a | 22104:cf19259edf87 |
---|---|
219 PrintWriter printer = new PrintWriter(out); | 219 PrintWriter printer = new PrintWriter(out); |
220 try { | 220 try { |
221 TruffleVM vm = TruffleVM.newVM().stdIn(new BufferedReader(new StringReader(repeat(testCase.testInput, repeats)))).stdOut(printer).build(); | 221 TruffleVM vm = TruffleVM.newVM().stdIn(new BufferedReader(new StringReader(repeat(testCase.testInput, repeats)))).stdOut(printer).build(); |
222 | 222 |
223 String script = readAllLines(testCase.path); | 223 String script = readAllLines(testCase.path); |
224 SLLanguage.run(vm, testCase.path.toUri(), null, printer, repeats, builtins); | 224 SLLanguage.run(vm, testCase.path, null, printer, repeats, builtins); |
225 | 225 |
226 printer.flush(); | 226 printer.flush(); |
227 String actualOutput = new String(out.toByteArray()); | 227 String actualOutput = new String(out.toByteArray()); |
228 Assert.assertEquals(script, repeat(testCase.expectedOutput, repeats), actualOutput); | 228 Assert.assertEquals(script, repeat(testCase.expectedOutput, repeats), actualOutput); |
229 } catch (Throwable ex) { | 229 } catch (Throwable ex) { |