Skip to content

Commit

Permalink
normalize paths for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Martijn Hoekstra authored and Martijn Hoekstra committed Sep 7, 2016
1 parent 75f4400 commit 2a2f314
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions test/test/CompilerTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -452,8 +452,7 @@ abstract class CompilerTest {
processFileDir(sourceFile, { sf =>
if (extensionsToCopy.contains(sf.extension)) {
dest.parent.jfile.mkdirs
dest.toFile.writeAll("/* !!!!! WARNING: DO NOT MODIFY. Original is at: $sf !!!!! */",
sf.slurp())
dest.toFile.writeAll(s"/* !!!!! WARNING: DO NOT MODIFY. Original is at: $sf !!!!! */", sf.slurp)
} else {
log(s"WARNING: ignoring $sf")
}
Expand Down
2 changes: 1 addition & 1 deletion test/test/InterfaceEntryPointTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import scala.collection.mutable.ListBuffer
*/
class InterfaceEntryPointTest {
@Test def runCompilerFromInterface = {
val sources = List("./tests/pos/HelloWorld.scala")
val sources = List("./tests/pos/HelloWorld.scala").map(p => new java.io.File(p).getPath())
val args = sources ++ List("-d", "./out/")

val mainClass = Class.forName("dotty.tools.dotc.Main")
Expand Down
4 changes: 2 additions & 2 deletions test/test/OtherEntryPointsTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import scala.collection.mutable.ListBuffer
*/
class OtherEntryPointsTest {
@Test def runCompiler = {
val sources = List("./tests/pos/HelloWorld.scala")
val sources = List("./tests/pos/HelloWorld.scala").map(p => new java.io.File(p).getPath())
val args = sources ++ List("-d", "./out/")

val reporter = new CustomReporter
Expand All @@ -31,7 +31,7 @@ class OtherEntryPointsTest {
}

@Test def runCompilerWithContext = {
val sources = List("./tests/pos/HelloWorld.scala")
val sources = List("./tests/pos/HelloWorld.scala").map(p => new java.io.File(p).getPath())
val args = sources ++ List("-d", "./out/")

val reporter = new CustomReporter
Expand Down

0 comments on commit 2a2f314

Please sign in to comment.