summaryrefslogtreecommitdiff
path: root/test/files/run/t9097.scala
diff options
context:
space:
mode:
authorSom Snytt <som.snytt@gmail.com>2015-01-20 07:56:17 -0800
committerSom Snytt <som.snytt@gmail.com>2015-01-20 07:56:17 -0800
commita8bfa82dcb470f31953f43e0db46570e7a020855 (patch)
treec72c58df878211080bedcb70af16145f9012224a /test/files/run/t9097.scala
parenta8b6e361de37705036c4e8307ad75e279fafe9f5 (diff)
downloadscala-a8bfa82dcb470f31953f43e0db46570e7a020855.tar.gz
scala-a8bfa82dcb470f31953f43e0db46570e7a020855.tar.bz2
scala-a8bfa82dcb470f31953f43e0db46570e7a020855.zip
SI-9097 Consolidate test
`pos` test is subsumed by `run`.
Diffstat (limited to 'test/files/run/t9097.scala')
-rw-r--r--test/files/run/t9097.scala12
1 files changed, 10 insertions, 2 deletions
diff --git a/test/files/run/t9097.scala b/test/files/run/t9097.scala
index 0f148c3b9d..d2bf55fc44 100644
--- a/test/files/run/t9097.scala
+++ b/test/files/run/t9097.scala
@@ -1,9 +1,16 @@
import scala.tools.partest._
import java.io.{Console => _, _}
-object Test extends DirectTest {
+object Test extends StoreReporterDirectTest {
- override def extraSettings: String = "-usejavacp -Ydelambdafy:method -Xprint:delambdafy -d " + testOutput.path
+ override def extraSettings: String = List(
+ "-usejavacp",
+ "-Xfatal-warnings",
+ "-Ybackend:GenBCode",
+ "-Ydelambdafy:method",
+ "-Xprint:delambdafy",
+ s"-d ${testOutput.path}"
+ ) mkString " "
override def code = """package o
|package a {
@@ -19,6 +26,7 @@ object Test extends DirectTest {
override def show(): Unit = {
val baos = new java.io.ByteArrayOutputStream()
Console.withOut(baos)(Console.withErr(baos)(compile()))
+ assert(!storeReporter.hasErrors, message = filteredInfos map (_.msg) mkString "; ")
val out = baos.toString("UTF-8")
// was 2 before the fix, the two PackageDefs for a would both contain the ClassDef for the closure
assert(out.lines.count(_ contains "class hihi$1") == 1, out)