diff --git a/jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/tests/java/test/junit/JavaAssertEqualsBetweenInconvertibleTypesInspectionTest.kt b/jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/tests/java/JavaAssertEqualsBetweenInconvertibleTypesInspectionTest.kt similarity index 85% rename from jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/tests/java/test/junit/JavaAssertEqualsBetweenInconvertibleTypesInspectionTest.kt rename to jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/tests/java/JavaAssertEqualsBetweenInconvertibleTypesInspectionTest.kt index 21c00b7bc6e8..4184e91b50fa 100644 --- a/jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/tests/java/test/junit/JavaAssertEqualsBetweenInconvertibleTypesInspectionTest.kt +++ b/jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/tests/java/JavaAssertEqualsBetweenInconvertibleTypesInspectionTest.kt @@ -1,16 +1,12 @@ -package com.intellij.codeInspection.tests.java.test.junit +package com.intellij.codeInspection.tests.java -import com.intellij.codeInspection.tests.test.junit.AssertEqualsBetweenInconvertibleTypesInspectionTestBase +import com.intellij.codeInspection.tests.AssertEqualsBetweenInconvertibleTypesInspectionTestBase import com.intellij.jvm.analysis.JavaJvmAnalysisTestUtil -import com.intellij.openapi.application.PathManager -import java.io.File class JavaAssertEqualsBetweenInconvertibleTypesInspectionTest : AssertEqualsBetweenInconvertibleTypesInspectionTestBase() { override fun getBasePath() = JavaJvmAnalysisTestUtil.TEST_DATA_PROJECT_RELATIVE_BASE_PATH + "/codeInspection/assert_equals_between_inconvertible_types" - override fun getTestDataPath(): String = PathManager.getCommunityHomePath().replace(File.separatorChar, '/') + basePath - fun `test AssertEqualsBetweenInconvertibleTypes`() { myFixture.testHighlighting("AssertEqualsBetweenInconvertibleTypes.java") } diff --git a/jvm/jvm-analysis-kotlin-tests/testSrc/com/intellij/codeInspection/tests/kotlin/test/junit/KotlinAssertEqualsBetweenInconvertibleTypesTest.kt b/jvm/jvm-analysis-kotlin-tests/testSrc/com/intellij/codeInspection/tests/kotlin/KotlinAssertEqualsBetweenInconvertibleTypesTest.kt similarity index 62% rename from jvm/jvm-analysis-kotlin-tests/testSrc/com/intellij/codeInspection/tests/kotlin/test/junit/KotlinAssertEqualsBetweenInconvertibleTypesTest.kt rename to jvm/jvm-analysis-kotlin-tests/testSrc/com/intellij/codeInspection/tests/kotlin/KotlinAssertEqualsBetweenInconvertibleTypesTest.kt index cfaf42f483ac..33abc274983a 100644 --- a/jvm/jvm-analysis-kotlin-tests/testSrc/com/intellij/codeInspection/tests/kotlin/test/junit/KotlinAssertEqualsBetweenInconvertibleTypesTest.kt +++ b/jvm/jvm-analysis-kotlin-tests/testSrc/com/intellij/codeInspection/tests/kotlin/KotlinAssertEqualsBetweenInconvertibleTypesTest.kt @@ -1,19 +1,14 @@ -package com.intellij.codeInspection.tests.kotlin.test.junit +package com.intellij.codeInspection.tests.kotlin -import com.intellij.codeInspection.tests.test.junit.AssertEqualsBetweenInconvertibleTypesInspectionTestBase +import com.intellij.codeInspection.tests.AssertEqualsBetweenInconvertibleTypesInspectionTestBase import com.intellij.jvm.analysis.KotlinJvmAnalysisTestUtil -import com.intellij.openapi.application.PathManager import com.intellij.testFramework.TestDataPath -import java.io.File private const val inspectionPath = "/codeInspection/assertEqualsBetweenInconvertibleTypes" @TestDataPath("\$CONTENT_ROOT/testData$inspectionPath") class KotlinAssertEqualsBetweenInconvertibleTypesTest : AssertEqualsBetweenInconvertibleTypesInspectionTestBase() { override fun getBasePath() = KotlinJvmAnalysisTestUtil.TEST_DATA_PROJECT_RELATIVE_BASE_PATH + inspectionPath - - override fun getTestDataPath(): String = PathManager.getCommunityHomePath().replace(File.separatorChar, '/') + basePath - fun `test AssertEqualsBetweenInconvertibleTypes`() { myFixture.testHighlighting("AssertEqualsBetweenInconvertibleTypes.kt") } diff --git a/jvm/jvm-analysis-tests/src/com/intellij/codeInspection/tests/test/junit/AssertEqualsBetweenInconvertibleTypesInspectionTestBase.kt b/jvm/jvm-analysis-tests/src/com/intellij/codeInspection/tests/AssertEqualsBetweenInconvertibleTypesInspectionTestBase.kt similarity index 88% rename from jvm/jvm-analysis-tests/src/com/intellij/codeInspection/tests/test/junit/AssertEqualsBetweenInconvertibleTypesInspectionTestBase.kt rename to jvm/jvm-analysis-tests/src/com/intellij/codeInspection/tests/AssertEqualsBetweenInconvertibleTypesInspectionTestBase.kt index 858bdfbad7ca..f74f285b637a 100644 --- a/jvm/jvm-analysis-tests/src/com/intellij/codeInspection/tests/test/junit/AssertEqualsBetweenInconvertibleTypesInspectionTestBase.kt +++ b/jvm/jvm-analysis-tests/src/com/intellij/codeInspection/tests/AssertEqualsBetweenInconvertibleTypesInspectionTestBase.kt @@ -1,10 +1,7 @@ -package com.intellij.codeInspection.tests.test.junit +package com.intellij.codeInspection.tests import com.intellij.codeInspection.AssertBetweenInconvertibleTypesInspection import com.intellij.codeInspection.InspectionProfileEntry -import com.intellij.codeInspection.tests.UastInspectionTestBase -import com.intellij.openapi.roots.LanguageLevelProjectExtension -import com.intellij.pom.java.LanguageLevel open class AssertEqualsBetweenInconvertibleTypesInspectionTestBase : UastInspectionTestBase() { @@ -12,8 +9,6 @@ open class AssertEqualsBetweenInconvertibleTypesInspectionTestBase : UastInspect override fun setUp() { super.setUp() - LanguageLevelProjectExtension.getInstance(project).languageLevel = LanguageLevel.JDK_1_8 - myFixture.enableInspections(AssertBetweenInconvertibleTypesInspection()) myFixture.addClass(""" package org.junit.jupiter.api; @@ -99,13 +94,4 @@ open class AssertEqualsBetweenInconvertibleTypesInspectionTestBase : UastInspect SELF isEqualTo(Object expected);} """.trimIndent()) } - - override fun tearDown() { - try { - myFixture.disableInspections(AssertBetweenInconvertibleTypesInspection()) - } - finally { - super.tearDown() - } - } }