From 787a2ceec02fe07fbb9efee673d3abb7cac2969e Mon Sep 17 00:00:00 2001 From: Felix Mulder Date: Fri, 16 Sep 2016 22:28:27 +0200 Subject: Add modifiers to highlighting --- test/test/CompilerTest.scala | 11 ++++++----- test/test/OtherEntryPointsTest.scala | 3 ++- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'test/test') diff --git a/test/test/CompilerTest.scala b/test/test/CompilerTest.scala index dea6a30b1..942948f08 100644 --- a/test/test/CompilerTest.scala +++ b/test/test/CompilerTest.scala @@ -5,6 +5,7 @@ import dotty.partest.DPConfig import dotty.tools.dotc.{Main, Bench, Driver} import dotty.tools.dotc.interfaces.Diagnostic.ERROR import dotty.tools.dotc.reporting._ +import diagnostic.Message import dotty.tools.dotc.util.SourcePosition import dotty.tools.dotc.config.CompilerCommand import dotty.tools.io.PlainFile @@ -237,13 +238,13 @@ abstract class CompilerTest { val storeReporter = new Reporter with UniqueMessagePositions with HideNonSensicalMessages { private val consoleReporter = new ConsoleReporter() private val innerStoreReporter = new StoreReporter(consoleReporter) - def doReport(d: Diagnostic)(implicit ctx: Context): Unit = { - if (d.level == ERROR) { + def doReport(m: Message)(implicit ctx: Context): Unit = { + if (m.level == ERROR) { innerStoreReporter.flush() - consoleReporter.doReport(d) + consoleReporter.doReport(m) } - else if (errorCount > 0) consoleReporter.doReport(d) - else innerStoreReporter.doReport(d) + else if (errorCount > 0) consoleReporter.doReport(m) + else innerStoreReporter.doReport(m) } } val reporter = processor.process(allArgs, storeReporter) diff --git a/test/test/OtherEntryPointsTest.scala b/test/test/OtherEntryPointsTest.scala index 5f8681d38..824034055 100644 --- a/test/test/OtherEntryPointsTest.scala +++ b/test/test/OtherEntryPointsTest.scala @@ -5,6 +5,7 @@ import org.junit.Assert._ import dotty.tools.dotc.Main import dotty.tools.dotc.interfaces.{CompilerCallback, SourceFile} import dotty.tools.dotc.reporting._ +import dotty.tools.dotc.reporting.diagnostic.Message import dotty.tools.dotc.core.Contexts._ import java.io.File import scala.collection.mutable.ListBuffer @@ -50,7 +51,7 @@ class OtherEntryPointsTest { private class CustomReporter extends Reporter with UniqueMessagePositions with HideNonSensicalMessages { - def doReport(d: Diagnostic)(implicit ctx: Context): Unit = { + def doReport(m: Message)(implicit ctx: Context): Unit = { } } -- cgit v1.2.3