Skip to content

Commit d126ba8

Browse files
committed
Fix tests
1 parent fe79288 commit d126ba8

File tree

7 files changed

+7
-8
lines changed

7 files changed

+7
-8
lines changed

compiler/test/dotty/tools/dotc/reporting/TestMessageLaziness.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ class TestMessageLaziness extends DottyTest {
2323
}
2424

2525
@Test def assureLazy =
26-
ctx.error(LazyError())
26+
report.error(LazyError())
2727

2828
@Test def assureLazyExtendMessage =
29-
ctx.errorOrMigrationWarning(LazyError(), from = config.SourceVersion.`3.1`)
29+
report.errorOrMigrationWarning(LazyError(), from = config.SourceVersion.`3.1`)
3030
}

compiler/test/dotty/tools/dotc/reporting/TestReporter.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import scala.collection.mutable
1212
import util.SourcePosition
1313
import core.Contexts._
1414
import Reporter._
15-
import messages._
1615
import Diagnostic._
1716
import interfaces.Diagnostic.{ ERROR, WARNING, INFO }
1817

compiler/test/dotty/tools/dotc/reporting/UserDefinedErrorMessages.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package dotc
33
package reporting
44

55
import dotty.tools.dotc.core.Contexts.Context
6-
import dotty.tools.dotc.reporting.messages._
76
import org.junit.Assert._
87
import org.junit.Test
98

compiler/test/dotty/tools/vulpix/ParallelTesting.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import scala.util.matching.Regex
1919
import dotc.{Compiler, Driver}
2020
import dotc.core.Contexts._
2121
import dotc.decompiler
22+
import dotc.report
2223
import dotc.interfaces.Diagnostic.ERROR
2324
import dotc.reporting.{Reporter, TestReporter}
2425
import dotc.reporting.Diagnostic
@@ -471,7 +472,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
471472
ntimes(times) { run =>
472473
val start = System.nanoTime()
473474
val rep = super.doCompile(comp, files)
474-
ctx.echo(s"\ntime run $run: ${(System.nanoTime - start) / 1000000}ms")
475+
report.echo(s"\ntime run $run: ${(System.nanoTime - start) / 1000000}ms")
475476
rep
476477
}
477478
}

doc-tool/test/dotty/tools/dottydoc/DottyDocTest.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ trait DottyDocTest extends MessageRendering {
124124
ctx.setSetting(ctx.settings.fromTasty, true)
125125
}
126126
val fromTastyCompiler = compilerWithChecker(assertion)
127-
val fromTastyRun = fromTastyCompiler.newRun(fromTastyCtx)
127+
val fromTastyRun = fromTastyCompiler.newRun(using fromTastyCtx)
128128
fromTastyRun.compile(classNames)
129129
assert(!fromTastyCtx.reporter.hasErrors)
130130
}

tests/plugins/neg/divideZero-research/plugin_1.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class DivideZero extends MiniPhase with ResearchPlugin {
3030

3131
override def transformApply(tree: tpd.Apply)(implicit ctx: Context): tpd.Tree = tree match {
3232
case tpd.Apply(fun, tpd.Literal(Constants.Constant(v)) :: Nil) if isNumericDivide(fun.symbol) && v == 0 =>
33-
ctx.error("divide by zero", tree.sourcePos)
33+
report.error("divide by zero", tree.sourcePos)
3434
tree
3535
case _ =>
3636
tree

tests/plugins/neg/divideZero/plugin_1.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class DivideZero extends PluginPhase with StandardPlugin {
3131

3232
override def transformApply(tree: tpd.Apply)(implicit ctx: Context): tpd.Tree = tree match {
3333
case tpd.Apply(fun, tpd.Literal(Constants.Constant(v)) :: Nil) if isNumericDivide(fun.symbol) && v == 0 =>
34-
ctx.error("divide by zero", tree.sourcePos)
34+
report.error("divide by zero", tree.sourcePos)
3535
tree
3636
case _ =>
3737
tree

0 commit comments

Comments
 (0)