Skip to content

Commit 18d4ca8

Browse files
nicolasstuckibiboudis
authored andcommitted
Make HelloWorld pass the tests
1 parent ab9a607 commit 18d4ca8

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

tests/run-with-compiler-custom-args/tasty-interpreter/Test.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ object Test {
6060
"<<<<<<<<<<<<<<<<<<"
6161
)
6262

63-
// compileAndInterpret("HelloWorld")
63+
compileAndInterpret("HelloWorld")
6464
// compileAndInterpret("i3518")
6565
// compileAndInterpret("withIndex")
6666
}
@@ -77,7 +77,7 @@ object Test {
7777
val actualOutput = interpret(out.toString)("Test")
7878

7979
val checkFile = java.nio.file.Paths.get("tests/run/" + testName + ".check")
80-
val expectedOutput = Source.fromFile(checkFile.toFile).getLines().mkString("\n")
80+
val expectedOutput = Source.fromFile(checkFile.toFile).getLines().mkString("", "\n", "\n")
8181

8282
assert(expectedOutput == actualOutput,
8383
"\n>>>>>>>>>>>>>>>>>>\n" +

tests/run-with-compiler-custom-args/tasty-interpreter/interpreter/TreeInterpreter.scala

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,12 @@ abstract class TreeInterpreter[R <: Reflection & Singleton](val reflect: R) {
155155

156156
inline def log[T](tag: => String, tree: => Statement)(thunk: => T): T = {
157157
if (LOG)
158-
println(s"#> $tag: ${tree.show}")
158+
println(
159+
s"""#> $tag:
160+
|${tree.showCode}
161+
|${tree.show}
162+
|
163+
|""".stripMargin)
159164
thunk
160165
}
161166

File renamed without changes.

0 commit comments

Comments
 (0)