@@ -723,6 +723,12 @@ trait ParallelTesting extends RunnerOrchestration { self =>
723
723
private final class PosTest (testSources : List [TestSource ], times : Int , threadLimit : Option [Int ], suppressAllOutput : Boolean )(implicit summaryReport : SummaryReporting )
724
724
extends Test (testSources, times, threadLimit, suppressAllOutput)
725
725
726
+ private final class WarnTest (testSources : List [TestSource ], times : Int , threadLimit : Option [Int ], suppressAllOutput : Boolean )(implicit summaryReport : SummaryReporting )
727
+ extends Test (testSources, times, threadLimit, suppressAllOutput):
728
+ override def suppressErrors = true
729
+ override def onSuccess (testSource : TestSource , reporters : Seq [TestReporter ], logger : LoggedRunnable ): Unit =
730
+ diffCheckfile(testSource, reporters, logger)
731
+
726
732
private final class RewriteTest (testSources : List [TestSource ], checkFiles : Map [JFile , JFile ], times : Int , threadLimit : Option [Int ], suppressAllOutput : Boolean )(implicit summaryReport : SummaryReporting )
727
733
extends Test (testSources, times, threadLimit, suppressAllOutput) {
728
734
private def verifyOutput (testSource : TestSource , reporters : Seq [TestReporter ], logger : LoggedRunnable ) = {
@@ -1020,6 +1026,9 @@ trait ParallelTesting extends RunnerOrchestration { self =>
1020
1026
def checkCompile ()(implicit summaryReport : SummaryReporting ): this .type =
1021
1027
checkPass(new PosTest (targets, times, threadLimit, shouldFail || shouldSuppressOutput), " Pos" )
1022
1028
1029
+ def checkWarnings ()(implicit summaryReport : SummaryReporting ): this .type =
1030
+ checkPass(new WarnTest (targets, times, threadLimit, shouldFail || shouldSuppressOutput), " Warn" )
1031
+
1023
1032
/** Creates a "neg" test run, which makes sure that each test generates the
1024
1033
* correct number of errors at the correct positions. It also makes sure
1025
1034
* that none of these tests crashes the compiler.
0 commit comments