Skip to content

Commit a8bfa82

Browse files
committed
SI-9097 Consolidate test
`pos` test is subsumed by `run`.
1 parent a8b6e36 commit a8bfa82

File tree

3 files changed

+10
-12
lines changed

3 files changed

+10
-12
lines changed

test/files/pos/t9097.flags

Lines changed: 0 additions & 1 deletion
This file was deleted.

test/files/pos/t9097.scala

Lines changed: 0 additions & 9 deletions
This file was deleted.

test/files/run/t9097.scala

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
import scala.tools.partest._
22
import java.io.{Console => _, _}
33

4-
object Test extends DirectTest {
4+
object Test extends StoreReporterDirectTest {
55

6-
override def extraSettings: String = "-usejavacp -Ydelambdafy:method -Xprint:delambdafy -d " + testOutput.path
6+
override def extraSettings: String = List(
7+
"-usejavacp",
8+
"-Xfatal-warnings",
9+
"-Ybackend:GenBCode",
10+
"-Ydelambdafy:method",
11+
"-Xprint:delambdafy",
12+
s"-d ${testOutput.path}"
13+
) mkString " "
714

815
override def code = """package o
916
|package a {
@@ -19,6 +26,7 @@ object Test extends DirectTest {
1926
override def show(): Unit = {
2027
val baos = new java.io.ByteArrayOutputStream()
2128
Console.withOut(baos)(Console.withErr(baos)(compile()))
29+
assert(!storeReporter.hasErrors, message = filteredInfos map (_.msg) mkString "; ")
2230
val out = baos.toString("UTF-8")
2331
// was 2 before the fix, the two PackageDefs for a would both contain the ClassDef for the closure
2432
assert(out.lines.count(_ contains "class hihi$1") == 1, out)

0 commit comments

Comments
 (0)