From a8bfa82dcb470f31953f43e0db46570e7a020855 Mon Sep 17 00:00:00 2001 From: Som Snytt Date: Tue, 20 Jan 2015 07:56:17 -0800 Subject: SI-9097 Consolidate test `pos` test is subsumed by `run`. --- test/files/run/t9097.scala | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'test/files/run') 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) -- cgit v1.2.3