From 107ab060422680158d27bb9ea7da8e413c215b4f Mon Sep 17 00:00:00 2001 From: Dmitry Petrov Date: Tue, 1 Oct 2019 12:39:44 +0300 Subject: [PATCH] Minor: make diagnostic tests usable with IDEA & JPS --- .../org/jetbrains/kotlin/checkers/AbstractDiagnosticsTest.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/checkers/AbstractDiagnosticsTest.kt b/compiler/tests-common/tests/org/jetbrains/kotlin/checkers/AbstractDiagnosticsTest.kt index a5e77c783e9..b9275087caa 100644 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/checkers/AbstractDiagnosticsTest.kt +++ b/compiler/tests-common/tests/org/jetbrains/kotlin/checkers/AbstractDiagnosticsTest.kt @@ -9,6 +9,7 @@ import com.intellij.openapi.util.io.FileUtil import com.intellij.openapi.util.text.StringUtil import com.intellij.psi.PsiElement import com.intellij.psi.search.GlobalSearchScope +import junit.framework.AssertionFailedError import junit.framework.TestCase import org.jetbrains.kotlin.TestsCompilerError import org.jetbrains.kotlin.analyzer.AnalysisResult @@ -71,6 +72,8 @@ abstract class AbstractDiagnosticsTest : BaseDiagnosticsTest() { analyzeAndCheckUnhandled(testDataFile, files) } catch (t: AssertionError) { throw t + } catch (t: AssertionFailedError) { + throw t } catch (t: Throwable) { throw TestsCompilerError(t) }