From e3b5cc491d7d206ecdf6c4fa732a6e1a7b7d90d2 Mon Sep 17 00:00:00 2001 From: Dmitriy Novozhilov Date: Mon, 19 Apr 2021 12:29:03 +0300 Subject: [PATCH] [Test] Throw exception from compiler at a first place --- .../tests/org/jetbrains/kotlin/test/TestRunner.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/compiler/test-infrastructure/tests/org/jetbrains/kotlin/test/TestRunner.kt b/compiler/test-infrastructure/tests/org/jetbrains/kotlin/test/TestRunner.kt index f7d78f5ef32..88a9d7b0d3f 100644 --- a/compiler/test-infrastructure/tests/org/jetbrains/kotlin/test/TestRunner.kt +++ b/compiler/test-infrastructure/tests/org/jetbrains/kotlin/test/TestRunner.kt @@ -9,6 +9,7 @@ import com.intellij.openapi.util.Disposer import com.intellij.testFramework.TestDataFile import org.jetbrains.kotlin.test.model.* import org.jetbrains.kotlin.test.services.* +import org.jetbrains.kotlin.utils.addToStdlib.firstIsInstanceOrNull import java.io.IOException class TestRunner(private val testConfiguration: TestConfiguration) { @@ -93,7 +94,9 @@ class TestRunner(private val testConfiguration: TestConfiguration) { } val filteredFailedAssertions = filterFailedExceptions(failedAssertions) - + filteredFailedAssertions.firstIsInstanceOrNull()?.let { + throw it + } services.assertions.assertAll(filteredFailedAssertions) }