Skip to content

Commit 1382e84

Browse files
committed
Partest command line options (same as scala) useable from sbt
1 parent 4bac1a5 commit 1382e84

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

test/test/CompilerTest.scala

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -146,25 +146,24 @@ abstract class CompilerTest extends DottyTest {
146146
(implicit defaultOptions: List[String]): Unit =
147147
compileDir(prefix, dirName, args, xerrors, true)
148148

149-
def runFiles(path: String, args: List[String] = Nil, verbose: Boolean = true)
150-
(implicit defaultOptions: List[String]): Unit =
151-
compileFiles(path, args, verbose, true)
152-
153149
/** Compiles each source in the directory path separately by calling
154150
* compileFile resp. compileDir. */
155-
def compileFiles(path: String, args: List[String] = Nil, verbose: Boolean = true, isRunTest: Boolean = false)
151+
def compileFiles(path: String, args: List[String] = Nil, verbose: Boolean = true, runTest: Boolean = false)
156152
(implicit defaultOptions: List[String]): Unit = {
157153
val dir = Directory(path)
158154
val fileNames = dir.files.toArray.map(_.jfile.getName).filter(name => (name endsWith ".scala") || (name endsWith ".java"))
159155
for (name <- fileNames) {
160156
if (verbose) println(s"testing $path$name")
161-
compileFile(path, name, args, 0, "", isRunTest)
157+
compileFile(path, name, args, 0, "", runTest)
162158
}
163159
for (subdir <- dir.dirs) {
164160
if (verbose) println(s"testing $subdir")
165-
compileDir(path, subdir.jfile.getName, args, 0, isRunTest)
161+
compileDir(path, subdir.jfile.getName, args, 0, runTest)
166162
}
167163
}
164+
def runFiles(path: String, args: List[String] = Nil, verbose: Boolean = true)
165+
(implicit defaultOptions: List[String]): Unit =
166+
compileFiles(path, args, verbose, true)
168167

169168
/** Compiles the given list of code files. */
170169
def compileList(testName: String, files: List[String], args: List[String] = Nil, xerrors: Int = 0)

0 commit comments

Comments
 (0)