Skip to content

Commit f46c2c2

Browse files
committed
bugfix: Adjust to older explicit nulls
1 parent e050e75 commit f46c2c2

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ extends Reporter with UniqueMessagePositions with HideNonSensicalMessages with M
3636
final def messages: Iterator[String] = _messageBuf.iterator
3737

3838
protected final val _consoleBuf = new StringWriter
39-
protected final val _consoleReporter = new ConsoleReporter(null, new PrintWriter(_consoleBuf)):
39+
protected final val _consoleReporter = new ConsoleReporter(scala.Console.in, new PrintWriter(_consoleBuf)):
4040
override protected def renderPath(file: AbstractFile): String = TestReporter.renderPath(file)
4141

4242
final def consoleOutput: String = _consoleBuf.toString
@@ -123,7 +123,7 @@ object TestReporter {
123123

124124
def logPath: String = {
125125
initLog()
126-
outFile.getCanonicalPath
126+
outFile.getCanonicalPath.nn
127127
}
128128

129129
def reporter(ps: PrintStream, logLevel: Int): TestReporter =
@@ -160,7 +160,7 @@ object TestReporter {
160160
Properties.rerunFailed &&
161161
failedTestsFile.exists() &&
162162
failedTestsFile.isFile
163-
)(readAllLines(failedTestsFile.toPath).asScala.toList)
163+
)(readAllLines(failedTestsFile.toPath).nn.asScala.toList)
164164

165165
def writeFailedTests(tests: List[String]): Unit =
166166
initLog()
@@ -169,7 +169,7 @@ object TestReporter {
169169

170170
def renderPath(file: AbstractFile): String =
171171
if JFile.separatorChar == '\\' then
172-
file.path.replace('\\', '/')
172+
file.path.replace('\\', '/').nn
173173
else
174174
file.path
175175
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,15 @@ class VulpixUnitTests:
7979
compileFile("tests/vulpix-tests/unit/deadlock.scala", defaultOptions).expectFailure.checkRuns()
8080

8181
@test def badJava: Unit =
82-
assertThrows[AssertionError](_.getMessage.contains("java compilation failed")):
82+
assertThrows[AssertionError](_.getMessage.nn.contains("java compilation failed")):
8383
compileFile("tests/vulpix-tests/unit/BadJava.java", defaultOptions)
8484
.suppressAllOutput
8585
.checkCompile()
8686

8787
@test def runTimeout: Unit =
8888
val fileName = s"tests/vulpix-tests/unit/timeout.scala"
8989
val expect = """(?m).*test '.+' timed out.*"""
90-
assertThrows[AssertionError](_.getMessage.linesIterator.toList.last.matches(expect)):
90+
assertThrows[AssertionError](_.getMessage.nn.linesIterator.toList.last.matches(expect)):
9191
compileFile(fileName, defaultOptions)
9292
.suppressAllOutput
9393
.checkRuns()

0 commit comments

Comments
 (0)