fix test data finding for jvm.java tests in community configuration

This commit is contained in:
Sergey Ignatov
2018-10-07 10:42:55 +01:00
parent 669705e539
commit 16bb0ed214
6 changed files with 13 additions and 6 deletions
@@ -17,7 +17,7 @@ import static com.intellij.codeInspection.tests.JvmAnalysisTestsUastUtil.getUEle
@TestDataPath("$CONTENT_ROOT/testData/codeInspection/nonNls")
public class NonNlsUastUtilTest extends JavaCodeInsightFixtureTestCase {
@Override
protected String getBasePath() {
protected String getTestDataPath() {
return JvmAnalysisTestsUtil.TEST_DATA_PROJECT_RELATIVE_BASE_PATH + "/codeInspection/nonNls";
}
@@ -6,7 +6,9 @@ import com.intellij.testFramework.TestDataPath
@TestDataPath("/testData/codeInspection/scheduledForRemoval")
class ScheduledForRemovalInspectionTest: ScheduledForRemovalInspectionTestBase() {
override fun getBasePath() = "${TEST_DATA_PROJECT_RELATIVE_BASE_PATH}/codeInspection/scheduledForRemoval"
override fun getBasePath() = ""
override fun getTestDataPath() = "${TEST_DATA_PROJECT_RELATIVE_BASE_PATH}/codeInspection/scheduledForRemoval"
fun testInspection() {
getInspection().myIgnoreInsideImports = false
@@ -7,7 +7,7 @@ import com.intellij.testFramework.TestDataPath;
@TestDataPath("$CONTENT_ROOT/testData/codeInspection/toUpperWithoutLocale")
public class StringToUpperWithoutLocaleInspectionTest extends StringToUpperWithoutLocaleInspectionTestBase {
@Override
protected String getBasePath() {
protected String getTestDataPath() {
return JvmAnalysisTestsUtil.TEST_DATA_PROJECT_RELATIVE_BASE_PATH + "/codeInspection/toUpperWithoutLocale";
}
@@ -9,7 +9,7 @@ import com.intellij.testFramework.builders.JavaModuleFixtureBuilder;
@TestDataPath("$CONTENT_ROOT/testData/codeInspection/uastCallMatcher")
public class UastCallMatcherTest extends UastCallMatcherTestBase {
@Override
protected String getBasePath() {
protected String getTestDataPath() {
return JvmAnalysisTestsUtil.TEST_DATA_PROJECT_RELATIVE_BASE_PATH + "/codeInspection/uastCallMatcher";
}
@@ -7,7 +7,9 @@ import com.intellij.testFramework.TestDataPath
@TestDataPath("/testData/codeInspection/unstableApiUsage")
class UnstableApiUsageInspectionTest : UnstableApiUsageInspectionTestBase() {
override fun getBasePath() = "${TEST_DATA_PROJECT_RELATIVE_BASE_PATH}/codeInspection/unstableApiUsage"
override fun getBasePath() = ""
override fun getTestDataPath() = "${TEST_DATA_PROJECT_RELATIVE_BASE_PATH}/codeInspection/unstableApiUsage"
fun testInspection() {
getInspection().myIgnoreInsideImports = false
@@ -1,6 +1,9 @@
// 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.jvm.analysis;
import com.intellij.openapi.application.ex.PathManagerEx;
public final class JvmAnalysisTestsUtil {
public static final String TEST_DATA_PROJECT_RELATIVE_BASE_PATH = "/community/jvm/jvm-analysis-java-tests/testData";
public static final String TEST_DATA_PROJECT_RELATIVE_BASE_PATH =
PathManagerEx.getCommunityHomePath() + "/jvm/jvm-analysis-java-tests/testData";
}