aboutsummaryrefslogtreecommitdiff
path: root/test/test/CompilerTest.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-02-06 21:55:50 +0100
committerMartin Odersky <odersky@gmail.com>2014-02-06 21:56:00 +0100
commit5f5a01c4f74a40eb6d387b83302da2d3c413969b (patch)
treeb70433b5df1d363ef8dc2e8e8645b3e988f717ba /test/test/CompilerTest.scala
parent0d356254c4d6326398c9c1a587ad193fadef6883 (diff)
downloaddotty-5f5a01c4f74a40eb6d387b83302da2d3c413969b.tar.gz
dotty-5f5a01c4f74a40eb6d387b83302da2d3c413969b.tar.bz2
dotty-5f5a01c4f74a40eb6d387b83302da2d3c413969b.zip
Make skolems live forever...
... because there's no way to reload them in a new run.
Diffstat (limited to 'test/test/CompilerTest.scala')
-rw-r--r--test/test/CompilerTest.scala13
1 files changed, 8 insertions, 5 deletions
diff --git a/test/test/CompilerTest.scala b/test/test/CompilerTest.scala
index 106020106..09112be2f 100644
--- a/test/test/CompilerTest.scala
+++ b/test/test/CompilerTest.scala
@@ -3,17 +3,20 @@ package test
import scala.reflect.io._
import org.junit.Test
import scala.collection.mutable.ListBuffer
-import dotty.tools.dotc.Main
+import dotty.tools.dotc.{Main, Bench, Driver}
import dotty.tools.dotc.reporting.Reporter
class CompilerTest extends DottyTest {
def defaultOptions: List[String] = Nil
- def compileArgs(args: Array[String], xerrors: Int = 0): Unit = {
- val nerrors = Main.process(args ++ defaultOptions).count(Reporter.ERROR.level)
- assert(nerrors == xerrors, s"Wrong # of errors. Expected: $xerrors, found: $nerrors")
- }
+ def compileArgs(args: Array[String], xerrors: Int = 0): Unit =
+ if (args.exists(_.startsWith("#")))
+ Bench.main(args ++ defaultOptions)
+ else {
+ val nerrors = Main.process(args ++ defaultOptions).count(Reporter.ERROR.level)
+ assert(nerrors == xerrors, s"Wrong # of errors. Expected: $xerrors, found: $nerrors")
+ }
def compileLine(cmdLine: String, xerrors: Int = 0): Unit = compileArgs(cmdLine.split("\n"), xerrors)