mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-07 05:09:37 +07:00
[jvm-inspections] Move Java test data for EmptyMethodInspection to JVM module; suppression top-level test
GitOrigin-RevId: 645e9ea69d7d2c81d65bfe73d6e74dc30c4e22e6
This commit is contained in:
committed by
intellij-monorepo-bot
parent
3e474191e3
commit
0ceb02ac9a
@@ -1,14 +1,23 @@
|
|||||||
// Copyright 2000-2020 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.
|
// Copyright 2000-2020 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.tests.java;
|
package com.intellij.codeInspection.tests.java;
|
||||||
|
|
||||||
import com.intellij.JavaTestUtil;
|
|
||||||
import com.intellij.codeInspection.emptyMethod.EmptyMethodInspection;
|
import com.intellij.codeInspection.emptyMethod.EmptyMethodInspection;
|
||||||
|
import com.intellij.jvm.analysis.JavaJvmAnalysisTestUtil;
|
||||||
|
import com.intellij.openapi.application.PathManager;
|
||||||
import com.intellij.testFramework.JavaInspectionTestCase;
|
import com.intellij.testFramework.JavaInspectionTestCase;
|
||||||
|
|
||||||
public class EmptyMethodInspectionTest extends JavaInspectionTestCase {
|
import java.io.File;
|
||||||
|
|
||||||
|
public class JavaEmptyMethodInspectionTest extends JavaInspectionTestCase {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String getBasePath() {
|
||||||
|
return JavaJvmAnalysisTestUtil.TEST_DATA_PROJECT_RELATIVE_BASE_PATH + "/codeInspection/emptyMethod/";
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getTestDataPath() {
|
protected String getTestDataPath() {
|
||||||
return JavaTestUtil.getJavaTestDataPath() + "/inspection";
|
return PathManager.getCommunityHomePath().replace(File.separatorChar, '/') + getBasePath();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void doTest() {
|
private void doTest() {
|
||||||
@@ -17,7 +26,7 @@ public class EmptyMethodInspectionTest extends JavaInspectionTestCase {
|
|||||||
|
|
||||||
private void doTest(final boolean checkRange) {
|
private void doTest(final boolean checkRange) {
|
||||||
final EmptyMethodInspection tool = new EmptyMethodInspection();
|
final EmptyMethodInspection tool = new EmptyMethodInspection();
|
||||||
doTest("emptyMethod/" + getTestName(true), tool, checkRange);
|
doTest(getTestName(true), tool, checkRange);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testSuperCall() {
|
public void testSuperCall() {
|
||||||
@@ -4,4 +4,8 @@ class TestSuppressFile {
|
|||||||
fun empty() {
|
fun empty() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun topLevel() {
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user