From 5c523507f9ee83c994366019f31c2aedb44b77e8 Mon Sep 17 00:00:00 2001 From: Nicolay Mitropolsky Date: Wed, 22 Aug 2018 15:58:22 +0300 Subject: [PATCH] Tests for *intellij.jvm.analysis* moved to specific packages and Java-tests added to `[JAVA_TESTS]` --- .../BlockingMethodInNonBlockingContextInspectionTest.java | 2 +- .../codeInspection/{ => tests/java}/NonNlsUastUtilTest.java | 4 ++-- .../java}/StringToUpperWithoutLocaleInspectionTest.java | 3 ++- .../codeInspection/{ => tests/java}/UastCallMatcherTest.java | 3 ++- .../{ => tests/java}/UnstableApiUsageInspectionTest.kt | 3 ++- .../{ => tests/kotlin}/KtNonNlsUastUtilTest.java | 4 ++-- .../{ => tests/kotlin}/KtUastCallMatcherTest.java | 3 ++- .../{ => tests/kotlin}/KtUnstableApiUsageInspectionTest.kt | 3 ++- .../codeInspection/{ => tests}/JvmAnalysisTestsUastUtil.java | 2 +- .../StringToUpperWithoutLocaleInspectionTestBase.java | 3 ++- .../codeInspection/{ => tests}/UastCallMatcherTestBase.java | 5 +++-- .../{ => tests}/UnstableApiUsageInspectionTestBase.kt | 3 ++- platform/testFramework/testSrc/tests/testGroups.properties | 1 + 13 files changed, 24 insertions(+), 15 deletions(-) rename jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/{ => tests/java}/BlockingMethodInNonBlockingContextInspectionTest.java (98%) rename jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/{ => tests/java}/NonNlsUastUtilTest.java (93%) rename jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/{ => tests/java}/StringToUpperWithoutLocaleInspectionTest.java (87%) rename jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/{ => tests/java}/UastCallMatcherTest.java (88%) rename jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/{ => tests/java}/UnstableApiUsageInspectionTest.kt (87%) rename jvm/jvm-analysis-kotlin-tests/testSrc/com/intellij/codeInspection/{ => tests/kotlin}/KtNonNlsUastUtilTest.java (93%) rename jvm/jvm-analysis-kotlin-tests/testSrc/com/intellij/codeInspection/{ => tests/kotlin}/KtUastCallMatcherTest.java (92%) rename jvm/jvm-analysis-kotlin-tests/testSrc/com/intellij/codeInspection/{ => tests/kotlin}/KtUnstableApiUsageInspectionTest.kt (90%) rename jvm/jvm-analysis-tests-api/src/com/intellij/codeInspection/{ => tests}/JvmAnalysisTestsUastUtil.java (96%) rename jvm/jvm-analysis-tests-api/src/com/intellij/codeInspection/{ => tests}/StringToUpperWithoutLocaleInspectionTestBase.java (89%) rename jvm/jvm-analysis-tests-api/src/com/intellij/codeInspection/{ => tests}/UastCallMatcherTestBase.java (96%) rename jvm/jvm-analysis-tests-api/src/com/intellij/codeInspection/{ => tests}/UnstableApiUsageInspectionTestBase.kt (97%) diff --git a/jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/BlockingMethodInNonBlockingContextInspectionTest.java b/jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/tests/java/BlockingMethodInNonBlockingContextInspectionTest.java similarity index 98% rename from jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/BlockingMethodInNonBlockingContextInspectionTest.java rename to jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/tests/java/BlockingMethodInNonBlockingContextInspectionTest.java index 3e2992ae4998..add99e42d41a 100644 --- a/jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/BlockingMethodInNonBlockingContextInspectionTest.java +++ b/jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/tests/java/BlockingMethodInNonBlockingContextInspectionTest.java @@ -1,5 +1,5 @@ // Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -package com.intellij.codeInspection; +package com.intellij.codeInspection.tests.java; import com.intellij.codeInspection.blockingCallsDetection.BlockingMethodInNonBlockingContextInspection; import com.intellij.openapi.application.ex.PathManagerEx; diff --git a/jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/NonNlsUastUtilTest.java b/jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/tests/java/NonNlsUastUtilTest.java similarity index 93% rename from jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/NonNlsUastUtilTest.java rename to jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/tests/java/NonNlsUastUtilTest.java index 1fd975e5aa72..77ba219638f2 100644 --- a/jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/NonNlsUastUtilTest.java +++ b/jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/tests/java/NonNlsUastUtilTest.java @@ -1,4 +1,4 @@ -package com.intellij.codeInspection; +package com.intellij.codeInspection.tests.java; import com.intellij.jvm.analysis.JvmAnalysisTestsUtil; import com.intellij.psi.PsiFile; @@ -12,7 +12,7 @@ import org.jetbrains.uast.ULiteralExpression; import java.util.Set; import static com.intellij.codeInspection.NonNlsUastUtil.isNonNlsStringLiteral; -import static com.intellij.codeInspection.JvmAnalysisTestsUastUtil.getUElementsOfTypeFromFile; +import static com.intellij.codeInspection.tests.JvmAnalysisTestsUastUtil.getUElementsOfTypeFromFile; @TestDataPath("$CONTENT_ROOT/testData/codeInspection/nonNls") public class NonNlsUastUtilTest extends JavaCodeInsightFixtureTestCase { diff --git a/jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/StringToUpperWithoutLocaleInspectionTest.java b/jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/tests/java/StringToUpperWithoutLocaleInspectionTest.java similarity index 87% rename from jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/StringToUpperWithoutLocaleInspectionTest.java rename to jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/tests/java/StringToUpperWithoutLocaleInspectionTest.java index af1f06c461fe..f6daf79eed86 100644 --- a/jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/StringToUpperWithoutLocaleInspectionTest.java +++ b/jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/tests/java/StringToUpperWithoutLocaleInspectionTest.java @@ -1,5 +1,6 @@ -package com.intellij.codeInspection; +package com.intellij.codeInspection.tests.java; +import com.intellij.codeInspection.tests.StringToUpperWithoutLocaleInspectionTestBase; import com.intellij.jvm.analysis.JvmAnalysisTestsUtil; import com.intellij.testFramework.TestDataPath; diff --git a/jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/UastCallMatcherTest.java b/jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/tests/java/UastCallMatcherTest.java similarity index 88% rename from jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/UastCallMatcherTest.java rename to jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/tests/java/UastCallMatcherTest.java index 424c595a2008..86a94bc464b7 100644 --- a/jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/UastCallMatcherTest.java +++ b/jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/tests/java/UastCallMatcherTest.java @@ -1,5 +1,6 @@ -package com.intellij.codeInspection; +package com.intellij.codeInspection.tests.java; +import com.intellij.codeInspection.tests.UastCallMatcherTestBase; import com.intellij.jvm.analysis.JvmAnalysisTestsUtil; import com.intellij.pom.java.LanguageLevel; import com.intellij.testFramework.TestDataPath; diff --git a/jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/UnstableApiUsageInspectionTest.kt b/jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/tests/java/UnstableApiUsageInspectionTest.kt similarity index 87% rename from jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/UnstableApiUsageInspectionTest.kt rename to jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/tests/java/UnstableApiUsageInspectionTest.kt index b3d6239cf812..f7dce1759c40 100644 --- a/jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/UnstableApiUsageInspectionTest.kt +++ b/jvm/jvm-analysis-java-tests/testSrc/com/intellij/codeInspection/tests/java/UnstableApiUsageInspectionTest.kt @@ -1,6 +1,7 @@ // Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -package com.intellij.codeInspection +package com.intellij.codeInspection.tests.java +import com.intellij.codeInspection.tests.UnstableApiUsageInspectionTestBase import com.intellij.jvm.analysis.JvmAnalysisTestsUtil.TEST_DATA_PROJECT_RELATIVE_BASE_PATH import com.intellij.testFramework.TestDataPath diff --git a/jvm/jvm-analysis-kotlin-tests/testSrc/com/intellij/codeInspection/KtNonNlsUastUtilTest.java b/jvm/jvm-analysis-kotlin-tests/testSrc/com/intellij/codeInspection/tests/kotlin/KtNonNlsUastUtilTest.java similarity index 93% rename from jvm/jvm-analysis-kotlin-tests/testSrc/com/intellij/codeInspection/KtNonNlsUastUtilTest.java rename to jvm/jvm-analysis-kotlin-tests/testSrc/com/intellij/codeInspection/tests/kotlin/KtNonNlsUastUtilTest.java index faa588875192..a3e6c6c942fd 100644 --- a/jvm/jvm-analysis-kotlin-tests/testSrc/com/intellij/codeInspection/KtNonNlsUastUtilTest.java +++ b/jvm/jvm-analysis-kotlin-tests/testSrc/com/intellij/codeInspection/tests/kotlin/KtNonNlsUastUtilTest.java @@ -1,4 +1,4 @@ -package com.intellij.codeInspection; +package com.intellij.codeInspection.tests.kotlin; import com.intellij.jvm.analysis.JvmAnalysisKtTestsUtil; import com.intellij.psi.PsiFile; @@ -13,8 +13,8 @@ import org.junit.Assume; import java.util.Set; -import static com.intellij.codeInspection.JvmAnalysisTestsUastUtil.getUElementsOfTypeFromFile; import static com.intellij.codeInspection.NonNlsUastUtil.isNonNlsStringLiteral; +import static com.intellij.codeInspection.tests.JvmAnalysisTestsUastUtil.getUElementsOfTypeFromFile; @TestDataPath("$CONTENT_ROOT/testData/codeInspection/nonNls") public class KtNonNlsUastUtilTest extends JavaCodeInsightFixtureTestCase { diff --git a/jvm/jvm-analysis-kotlin-tests/testSrc/com/intellij/codeInspection/KtUastCallMatcherTest.java b/jvm/jvm-analysis-kotlin-tests/testSrc/com/intellij/codeInspection/tests/kotlin/KtUastCallMatcherTest.java similarity index 92% rename from jvm/jvm-analysis-kotlin-tests/testSrc/com/intellij/codeInspection/KtUastCallMatcherTest.java rename to jvm/jvm-analysis-kotlin-tests/testSrc/com/intellij/codeInspection/tests/kotlin/KtUastCallMatcherTest.java index 27055d809a5a..13313ebc58ea 100644 --- a/jvm/jvm-analysis-kotlin-tests/testSrc/com/intellij/codeInspection/KtUastCallMatcherTest.java +++ b/jvm/jvm-analysis-kotlin-tests/testSrc/com/intellij/codeInspection/tests/kotlin/KtUastCallMatcherTest.java @@ -1,5 +1,6 @@ -package com.intellij.codeInspection; +package com.intellij.codeInspection.tests.kotlin; +import com.intellij.codeInspection.tests.UastCallMatcherTestBase; import com.intellij.jvm.analysis.JvmAnalysisKtTestsUtil; import com.intellij.openapi.application.PathManager; import com.intellij.testFramework.TestDataPath; diff --git a/jvm/jvm-analysis-kotlin-tests/testSrc/com/intellij/codeInspection/KtUnstableApiUsageInspectionTest.kt b/jvm/jvm-analysis-kotlin-tests/testSrc/com/intellij/codeInspection/tests/kotlin/KtUnstableApiUsageInspectionTest.kt similarity index 90% rename from jvm/jvm-analysis-kotlin-tests/testSrc/com/intellij/codeInspection/KtUnstableApiUsageInspectionTest.kt rename to jvm/jvm-analysis-kotlin-tests/testSrc/com/intellij/codeInspection/tests/kotlin/KtUnstableApiUsageInspectionTest.kt index 50277fbbae2d..428d3b19929e 100644 --- a/jvm/jvm-analysis-kotlin-tests/testSrc/com/intellij/codeInspection/KtUnstableApiUsageInspectionTest.kt +++ b/jvm/jvm-analysis-kotlin-tests/testSrc/com/intellij/codeInspection/tests/kotlin/KtUnstableApiUsageInspectionTest.kt @@ -1,6 +1,7 @@ // Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -package com.intellij.codeInspection +package com.intellij.codeInspection.tests.kotlin +import com.intellij.codeInspection.tests.UnstableApiUsageInspectionTestBase import com.intellij.jvm.analysis.JvmAnalysisKtTestsUtil.TEST_DATA_PROJECT_RELATIVE_BASE_PATH import com.intellij.openapi.vfs.VirtualFileFilter import com.intellij.testFramework.TestDataPath diff --git a/jvm/jvm-analysis-tests-api/src/com/intellij/codeInspection/JvmAnalysisTestsUastUtil.java b/jvm/jvm-analysis-tests-api/src/com/intellij/codeInspection/tests/JvmAnalysisTestsUastUtil.java similarity index 96% rename from jvm/jvm-analysis-tests-api/src/com/intellij/codeInspection/JvmAnalysisTestsUastUtil.java rename to jvm/jvm-analysis-tests-api/src/com/intellij/codeInspection/tests/JvmAnalysisTestsUastUtil.java index d57f8c7e6ab7..4e63f955032f 100644 --- a/jvm/jvm-analysis-tests-api/src/com/intellij/codeInspection/JvmAnalysisTestsUastUtil.java +++ b/jvm/jvm-analysis-tests-api/src/com/intellij/codeInspection/tests/JvmAnalysisTestsUastUtil.java @@ -1,4 +1,4 @@ -package com.intellij.codeInspection; +package com.intellij.codeInspection.tests; import com.intellij.psi.PsiElement; import com.intellij.psi.PsiFile; diff --git a/jvm/jvm-analysis-tests-api/src/com/intellij/codeInspection/StringToUpperWithoutLocaleInspectionTestBase.java b/jvm/jvm-analysis-tests-api/src/com/intellij/codeInspection/tests/StringToUpperWithoutLocaleInspectionTestBase.java similarity index 89% rename from jvm/jvm-analysis-tests-api/src/com/intellij/codeInspection/StringToUpperWithoutLocaleInspectionTestBase.java rename to jvm/jvm-analysis-tests-api/src/com/intellij/codeInspection/tests/StringToUpperWithoutLocaleInspectionTestBase.java index 8d4f5453cfe1..0c89edbab5e4 100644 --- a/jvm/jvm-analysis-tests-api/src/com/intellij/codeInspection/StringToUpperWithoutLocaleInspectionTestBase.java +++ b/jvm/jvm-analysis-tests-api/src/com/intellij/codeInspection/tests/StringToUpperWithoutLocaleInspectionTestBase.java @@ -1,5 +1,6 @@ -package com.intellij.codeInspection; +package com.intellij.codeInspection.tests; +import com.intellij.codeInspection.StringToUpperWithoutLocale2Inspection; import com.intellij.pom.java.LanguageLevel; import com.intellij.testFramework.IdeaTestUtil; import com.intellij.testFramework.builders.JavaModuleFixtureBuilder; diff --git a/jvm/jvm-analysis-tests-api/src/com/intellij/codeInspection/UastCallMatcherTestBase.java b/jvm/jvm-analysis-tests-api/src/com/intellij/codeInspection/tests/UastCallMatcherTestBase.java similarity index 96% rename from jvm/jvm-analysis-tests-api/src/com/intellij/codeInspection/UastCallMatcherTestBase.java rename to jvm/jvm-analysis-tests-api/src/com/intellij/codeInspection/tests/UastCallMatcherTestBase.java index 74926e80765a..784a9ef18aa2 100644 --- a/jvm/jvm-analysis-tests-api/src/com/intellij/codeInspection/UastCallMatcherTestBase.java +++ b/jvm/jvm-analysis-tests-api/src/com/intellij/codeInspection/tests/UastCallMatcherTestBase.java @@ -1,5 +1,6 @@ -package com.intellij.codeInspection; +package com.intellij.codeInspection.tests; +import com.intellij.codeInspection.UastCallMatcher; import com.intellij.psi.PsiFile; import com.intellij.testFramework.IdeaTestUtil; import com.intellij.testFramework.TestDataFile; @@ -14,8 +15,8 @@ import org.jetbrains.uast.UastCallKind; import java.util.Locale; import java.util.Set; -import static com.intellij.codeInspection.JvmAnalysisTestsUastUtil.getUElementsOfTypeFromFile; import static com.intellij.codeInspection.UastCallMatcher.builder; +import static com.intellij.codeInspection.tests.JvmAnalysisTestsUastUtil.getUElementsOfTypeFromFile; public abstract class UastCallMatcherTestBase extends JavaCodeInsightFixtureTestCase { @Override diff --git a/jvm/jvm-analysis-tests-api/src/com/intellij/codeInspection/UnstableApiUsageInspectionTestBase.kt b/jvm/jvm-analysis-tests-api/src/com/intellij/codeInspection/tests/UnstableApiUsageInspectionTestBase.kt similarity index 97% rename from jvm/jvm-analysis-tests-api/src/com/intellij/codeInspection/UnstableApiUsageInspectionTestBase.kt rename to jvm/jvm-analysis-tests-api/src/com/intellij/codeInspection/tests/UnstableApiUsageInspectionTestBase.kt index 95b4d94ab308..eae75602f282 100644 --- a/jvm/jvm-analysis-tests-api/src/com/intellij/codeInspection/UnstableApiUsageInspectionTestBase.kt +++ b/jvm/jvm-analysis-tests-api/src/com/intellij/codeInspection/tests/UnstableApiUsageInspectionTestBase.kt @@ -1,6 +1,7 @@ // Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -package com.intellij.codeInspection +package com.intellij.codeInspection.tests +import com.intellij.codeInspection.UnstableApiUsageInspection import com.intellij.testFramework.builders.JavaModuleFixtureBuilder import com.intellij.testFramework.fixtures.JavaCodeInsightFixtureTestCase import com.intellij.util.PathUtil diff --git a/platform/testFramework/testSrc/tests/testGroups.properties b/platform/testFramework/testSrc/tests/testGroups.properties index 17929cac9340..e18a25e21b46 100644 --- a/platform/testFramework/testSrc/tests/testGroups.properties +++ b/platform/testFramework/testSrc/tests/testGroups.properties @@ -123,6 +123,7 @@ com.intellij.*.*GuiTestSuite [JAVA_TESTS] com.intellij.java.* org.jetbrains.uast.test.java.* +com.intellij.codeInspection.tests.java.* com.siyeh.* -com.intellij.javaee.* -com.intellij.javascript.*