aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorVladimirNik <vladimir.nikolaev9@gmail.com>2016-03-03 15:50:30 +0100
committerVladimirNik <vladimir.nikolaev9@gmail.com>2016-03-03 15:50:30 +0100
commit2b8cd5a594c76fa4500f9c50b2bcd9e5c0c3ceae (patch)
treee4ecbfe308403d53cea08758d34310ec30480e2d /test
parent92b6677f3f79bddeaf38c634ba94197e9e805274 (diff)
downloaddotty-2b8cd5a594c76fa4500f9c50b2bcd9e5c0c3ceae.tar.gz
dotty-2b8cd5a594c76fa4500f9c50b2bcd9e5c0c3ceae.tar.bz2
dotty-2b8cd5a594c76fa4500f9c50b2bcd9e5c0c3ceae.zip
Neg tests: change val computeFilePathsAndExpErrors to def
Diffstat (limited to 'test')
-rw-r--r--test/test/CompilerTest.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/test/CompilerTest.scala b/test/test/CompilerTest.scala
index de81792e0..678ef74b1 100644
--- a/test/test/CompilerTest.scala
+++ b/test/test/CompilerTest.scala
@@ -113,7 +113,7 @@ abstract class CompilerTest {
* with "-deep", all files in subdirectories (and so on) are included. */
def compileDir(prefix: String, dirName: String, args: List[String] = Nil, runTest: Boolean = false)
(implicit defaultOptions: List[String]): Unit = {
- val computeFilePathsAndExpErrors = { () =>
+ def computeFilePathsAndExpErrors = {
val dir = Directory(prefix + dirName)
val (files, normArgs) = args match {
case "-deep" :: args1 => (dir.deepFiles, args1)
@@ -126,7 +126,7 @@ abstract class CompilerTest {
if (!generatePartestFiles || !partestableDir(prefix, dirName, args ++ defaultOptions)) {
if (runTest)
log(s"WARNING: run tests can only be run by partest, JUnit just verifies compilation: $prefix$dirName")
- val (filePaths, normArgs, expErrors) = computeFilePathsAndExpErrors()
+ val (filePaths, normArgs, expErrors) = computeFilePathsAndExpErrors
compileArgs(filePaths ++ normArgs, expErrors)
} else {
val (sourceDir, flags, deep) = args match {
@@ -139,7 +139,7 @@ abstract class CompilerTest {
if (sourceDir.exists) {
val firstDest = Directory(DPConfig.testRoot + JFile.separator + kind + JFile.separator + dirName)
val xerrors = if (isNegTest(prefix)) {
- val (_, _, expErrors) = computeFilePathsAndExpErrors()
+ val (_, _, expErrors) = computeFilePathsAndExpErrors
expErrors.map(_.totalErrors).sum
} else 0
computeDestAndCopyFiles(sourceDir, firstDest, kind, flags, xerrors.toString)