File tree 1 file changed +7
-2
lines changed
compiler/test/dotty/tools/dotc 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import org.junit.Test
5
5
import org .junit .Assert ._
6
6
import interfaces ._
7
7
import scala .collection .mutable .ListBuffer
8
+ import java .nio .file ._
8
9
9
10
/** Test that demonstrates how to use dotty-interfaces
10
11
*
@@ -20,8 +21,12 @@ import scala.collection.mutable.ListBuffer
20
21
class InterfaceEntryPointTest {
21
22
@ Test def runCompilerFromInterface = {
22
23
val sources =
23
- List (" ../tests/pos/HelloWorld.scala" ).map(p => new java.io.File (p).getPath())
24
- val args = sources ++ List (" -d" , " ../out/" , " -usejavacp" )
24
+ List (" ../tests/pos/HelloWorld.scala" ).map(p => Paths .get(p).toAbsolutePath().toString)
25
+ val out = Paths .get(" ../out/" ).toAbsolutePath()
26
+ if (Files .notExists(out))
27
+ Files .createDirectory(out)
28
+
29
+ val args = sources ++ List (" -d" , out.toString, " -usejavacp" )
25
30
26
31
val mainClass = Class .forName(" dotty.tools.dotc.Main" )
27
32
val process = mainClass.getMethod(" process" ,
You can’t perform that action at this time.
0 commit comments