Skip to content

Commit 8c53e97

Browse files
Fix vulpix to fail on error free neg tests
1 parent afe87a8 commit 8c53e97

File tree

3 files changed

+13
-21
lines changed

3 files changed

+13
-21
lines changed

compiler/test/dotty/tools/dotc/CompilationTests.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,6 @@ class CompilationTests extends ParallelTesting {
189189
compileFile("../tests/neg-custom-args/xfatalWarnings.scala", defaultOptions.and("-Xfatal-warnings")) +
190190
compileFile("../tests/neg-custom-args/i3561.scala", defaultOptions.and("-Xfatal-warnings")) +
191191
compileFile("../tests/neg-custom-args/pureStatement.scala", defaultOptions.and("-Xfatal-warnings")) +
192-
compileFile("../tests/neg-custom-args/i3589-a.scala", defaultOptions.and("-Xfatal-warnings")) +
193192
compileFile("../tests/neg-custom-args/i2333.scala", defaultOptions.and("-Xfatal-warnings")) +
194193
compileFile("../tests/neg-custom-args/i3882.scala", allowDeepSubtypes) +
195194
compileFile("../tests/neg-custom-args/phantom-overload.scala", allowDoubleBindings) +

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

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -783,29 +783,22 @@ trait ParallelTesting extends RunnerOrchestration { self =>
783783
}
784784
}
785785

786-
if (compilerCrashed) {
787-
echo(s"Compiler crashed when compiling: ${testSource.title}")
788-
failTestSource(testSource)
789-
}
790-
else if (expectedErrors != actualErrors) {
791-
echo {
792-
s"\nWrong number of errors encountered when compiling $testSource, expected: $expectedErrors, actual: $actualErrors\n"
793-
}
794-
failTestSource(testSource)
795-
}
796-
else if (hasMissingAnnotations()) {
797-
echo {
798-
s"\nErrors found on incorrect row numbers when compiling $testSource"
799-
}
800-
failTestSource(testSource)
801-
}
802-
else if (!errorMap.isEmpty) {
803-
echo {
804-
s"\nExpected error(s) have {<error position>=<unreported error>}: $errorMap"
805-
}
786+
def fail(msg: String): Unit = {
787+
echo(msg)
806788
failTestSource(testSource)
807789
}
808790

791+
if (compilerCrashed)
792+
fail(s"Compiler crashed when compiling: ${testSource.title}")
793+
else if (actualErrors == 0)
794+
fail(s"\nNo errors found when compiling neg test $testSource")
795+
else if (expectedErrors != actualErrors)
796+
fail(s"\nWrong number of errors encountered when compiling $testSource, expected: $expectedErrors, actual: $actualErrors")
797+
else if (hasMissingAnnotations())
798+
fail(s"\nErrors found on incorrect row numbers when compiling $testSource")
799+
else if (!errorMap.isEmpty)
800+
fail(s"\nExpected error(s) have {<error position>=<unreported error>}: $errorMap")
801+
809802
registerCompletion(actualErrors)
810803
}
811804
}
File renamed without changes.

0 commit comments

Comments
 (0)