aboutsummaryrefslogtreecommitdiff
path: root/test/test/DottyTest.scala
diff options
context:
space:
mode:
authorFelix Mulder <felix.mulder@gmail.com>2016-10-19 15:30:27 +0200
committerGuillaume Martres <smarter@ubuntu.com>2016-11-22 01:35:06 +0100
commit6351c6cc8c3014fd1fbb8244e872c9e28773dad0 (patch)
tree27c6642fbd02a13f0032934cd3f8dde6992e3f44 /test/test/DottyTest.scala
parent805884cb664467ae97922e1afe44891c64fcfde2 (diff)
downloaddotty-6351c6cc8c3014fd1fbb8244e872c9e28773dad0.tar.gz
dotty-6351c6cc8c3014fd1fbb8244e872c9e28773dad0.tar.bz2
dotty-6351c6cc8c3014fd1fbb8244e872c9e28773dad0.zip
Create dotty-lib.jar for run tests
Diffstat (limited to 'test/test/DottyTest.scala')
-rw-r--r--test/test/DottyTest.scala9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/test/DottyTest.scala b/test/test/DottyTest.scala
index 4c8cd8a7b..57bd9bbc4 100644
--- a/test/test/DottyTest.scala
+++ b/test/test/DottyTest.scala
@@ -22,8 +22,14 @@ class DottyTest extends ContextEscapeDetection{
val base = new ContextBase {}
import base.settings._
val ctx = base.initialCtx.fresh
- base.initialize()(ctx)
ctx.setSetting(ctx.settings.encoding, "UTF8")
+ ctx.setSetting(
+ ctx.settings.classpath,
+ "./library/target/scala-2.11/dotty-library_2.11-0.1-SNAPSHOT.jar"
+ )
+ // when classpath is changed in ctx, we need to re-initialize to get the
+ // correct classpath from PathResolver
+ base.initialize()(ctx)
ctx
}
@@ -31,6 +37,7 @@ class DottyTest extends ContextEscapeDetection{
override def clearCtx() = {
ctx = null
}
+
private def compilerWithChecker(phase: String)(assertion:(tpd.Tree, Context) => Unit) = new Compiler {
override def phases = {
val allPhases = super.phases