diff options
author | Martin Odersky <odersky@gmail.com> | 2013-04-09 15:03:45 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-04-09 15:03:45 +0200 |
commit | d1c2fe7ab3b2cddb224f24ce37fdc0bf4237d5a4 (patch) | |
tree | c12292809229f1e0603041d984ba5f7a0d57e9ff /test | |
parent | 29e4d716fc188694b223970a9e81767d74a70c8b (diff) | |
download | dotty-d1c2fe7ab3b2cddb224f24ce37fdc0bf4237d5a4.tar.gz dotty-d1c2fe7ab3b2cddb224f24ce37fdc0bf4237d5a4.tar.bz2 dotty-d1c2fe7ab3b2cddb224f24ce37fdc0bf4237d5a4.zip |
ShowClass tests now run both with -Ydebug and without.
Diffstat (limited to 'test')
-rw-r--r-- | test/test/DottyTest.scala | 2 | ||||
-rw-r--r-- | test/test/ShowClassTests.scala | 9 | ||||
-rw-r--r-- | test/test/showClass.scala | 2 |
3 files changed, 10 insertions, 3 deletions
diff --git a/test/test/DottyTest.scala b/test/test/DottyTest.scala index 2a03877b2..6f083dc71 100644 --- a/test/test/DottyTest.scala +++ b/test/test/DottyTest.scala @@ -16,7 +16,7 @@ class DottyTest { import base.settings._ val ctx = base.initialCtx.fresh .withSetting(verbose, true) - .withSetting(debug, true) +// .withSetting(debug, true) // .withSetting(debugTrace, true) .withSetting(Ylogcp, true) .withSetting(printtypes, true) diff --git a/test/test/ShowClassTests.scala b/test/test/ShowClassTests.scala index 0119bedad..db7eaf3d5 100644 --- a/test/test/ShowClassTests.scala +++ b/test/test/ShowClassTests.scala @@ -34,7 +34,12 @@ class ShowClassTests extends DottyTest { "scala.tools.partest.PartestTask", "dotty.tools.dotc.core.pickling.AbstractFileReader") - def showPackage(pkg: TermSymbol)(implicit ctx: Context): Unit = { + def doTwice(test: Context => Unit)(implicit ctx: Context): Unit = { + test(ctx.fresh.withSetting(ctx.base.settings.debug, true)) + test(ctx.fresh.withSetting(ctx.base.settings.debug, false)) + } + + def showPackage(pkg: TermSymbol)(implicit ctx: Context): Unit = doTwice { implicit ctx => val path = pkg.fullName.toString if (blackList contains path) println(s"blacklisted package: $path") @@ -66,7 +71,7 @@ class ShowClassTests extends DottyTest { } } - def showClasses(path: String)(implicit ctx: Context): Unit = { + def showClasses(path: String)(implicit ctx: Context): Unit = doTwice { implicit ctx => println(s"showing file $path") val cls = ctx.requiredClass(path.toTypeName) showClass(cls) diff --git a/test/test/showClass.scala b/test/test/showClass.scala index 5938e0559..d38432e21 100644 --- a/test/test/showClass.scala +++ b/test/test/showClass.scala @@ -9,6 +9,8 @@ object showClass extends ShowClassTests { showClasses("scala.collection.immutable.List") // showPackage("scala.reflect") // showPackage("scala.collection") + + showPackage("dotty") showPackage("scala") println("done") } |