@@ -113,7 +113,7 @@ abstract class CompilerTest {
113
113
* with "-deep", all files in subdirectories (and so on) are included. */
114
114
def compileDir (prefix : String , dirName : String , args : List [String ] = Nil , runTest : Boolean = false )
115
115
(implicit defaultOptions : List [String ]): Unit = {
116
- val computeFilePathsAndExpErrors = { () =>
116
+ def computeFilePathsAndExpErrors = {
117
117
val dir = Directory (prefix + dirName)
118
118
val (files, normArgs) = args match {
119
119
case " -deep" :: args1 => (dir.deepFiles, args1)
@@ -126,7 +126,7 @@ abstract class CompilerTest {
126
126
if (! generatePartestFiles || ! partestableDir(prefix, dirName, args ++ defaultOptions)) {
127
127
if (runTest)
128
128
log(s " WARNING: run tests can only be run by partest, JUnit just verifies compilation: $prefix$dirName" )
129
- val (filePaths, normArgs, expErrors) = computeFilePathsAndExpErrors()
129
+ val (filePaths, normArgs, expErrors) = computeFilePathsAndExpErrors
130
130
compileArgs(filePaths ++ normArgs, expErrors)
131
131
} else {
132
132
val (sourceDir, flags, deep) = args match {
@@ -139,7 +139,7 @@ abstract class CompilerTest {
139
139
if (sourceDir.exists) {
140
140
val firstDest = Directory (DPConfig .testRoot + JFile .separator + kind + JFile .separator + dirName)
141
141
val xerrors = if (isNegTest(prefix)) {
142
- val (_, _, expErrors) = computeFilePathsAndExpErrors()
142
+ val (_, _, expErrors) = computeFilePathsAndExpErrors
143
143
expErrors.map(_.totalErrors).sum
144
144
} else 0
145
145
computeDestAndCopyFiles(sourceDir, firstDest, kind, flags, xerrors.toString)
0 commit comments