Skip to content

Commit 370f5f8

Browse files
committed
Show errors in errorless test
1 parent a374c1d commit 370f5f8

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -947,16 +947,22 @@ trait ParallelTesting extends RunnerOrchestration:
947947

948948
Option {
949949
if actualErrors == 0 then s"\nNo errors found when compiling neg test $testSource"
950-
else if expectedErrors == 0 then s"\nNo errors expected/defined in $testSource -- use // error or // nopos-error"
950+
else if expectedErrors == 0 then
951+
s"""|
952+
|No errors expected/defined in $testSource -- use // error or // nopos-error"
953+
|$showErrors
954+
|""".stripMargin.trim.linesIterator.mkString("\n", "\n", "")
951955
else if expectedErrors != actualErrors then
952956
s"""|Wrong number of errors encountered when compiling $testSource
953957
|expected: $expectedErrors, actual: $actualErrors
954958
|${expected.mkString("Unfulfilled expectations:\n", "\n", "")}
955959
|${unexpected.mkString("Unexpected errors:\n", "\n", "")}
956960
|$showErrors
957961
|""".stripMargin.trim.linesIterator.mkString("\n", "\n", "")
958-
else if hasMissingAnnotations then s"\nErrors found on incorrect row numbers when compiling $testSource\n$showErrors"
959-
else if !errorMap.isEmpty then s"\nExpected error(s) have {<error position>=<unreported error>}: $errorMap"
962+
else if hasMissingAnnotations then
963+
s"\nErrors found on incorrect row numbers when compiling $testSource\n$showErrors"
964+
else if !errorMap.isEmpty then
965+
s"\nExpected error(s) have {<error position>=<unreported error>}: $errorMap"
960966
else null
961967
}
962968
end maybeFailureMessage

0 commit comments

Comments
 (0)