Skip to content

Commit 9c1cb55

Browse files
committed
Honor -verbose in tests
-verbose output was suppressed like all other non-error output in the tests. Now we don't filter output if -verbose is set.
1 parent ede2d53 commit 9c1cb55

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/test/dotty/tools/dotc/CompilerTest.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,13 +264,14 @@ abstract class CompilerTest {
264264
private def compileArgs(args: Array[String], expectedErrorsPerFile: List[ErrorsInFile])
265265
(implicit defaultOptions: List[String]): Unit = {
266266
val allArgs = args ++ defaultOptions
267+
val verbose = allArgs.contains("-verbose")
267268
//println(s"""all args: ${allArgs.mkString("\n")}""")
268269
val processor = if (allArgs.exists(_.startsWith("#"))) Bench else Main
269270
val storeReporter = new Reporter with UniqueMessagePositions with HideNonSensicalMessages {
270271
private val consoleReporter = new ConsoleReporter()
271272
private val innerStoreReporter = new StoreReporter(consoleReporter)
272273
def doReport(m: MessageContainer)(implicit ctx: Context): Unit = {
273-
if (m.level == ERROR) {
274+
if (m.level == ERROR || verbose) {
274275
innerStoreReporter.flush()
275276
consoleReporter.doReport(m)
276277
}

0 commit comments

Comments
 (0)