mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-06 11:50:54 +07:00
[jvm] IDEA-271571 Don't highlight @TestOnly usages in doc
GitOrigin-RevId: e9011bbb9d881333316563cde008af0e4ab0d954
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d31c36d811
commit
72379c315e
@@ -0,0 +1,22 @@
|
||||
|
||||
package test;
|
||||
|
||||
import org.jetbrains.annotations.TestOnly;
|
||||
import org.jetbrains.annotations.VisibleForTesting;
|
||||
import java.util.function.Function;
|
||||
|
||||
public class TestOnlyDoc {
|
||||
@TestOnly
|
||||
TestOnlyDoc() { }
|
||||
|
||||
@TestOnly
|
||||
static String testMethod() { return "Foo"; }
|
||||
|
||||
/**
|
||||
* {@link #TestOnlyTest()}
|
||||
* {@link #TestOnlyTest#testMethod()}
|
||||
* {@link #testMethod()}
|
||||
*/
|
||||
public static void docced() { }
|
||||
}
|
||||
|
||||
@@ -6,6 +6,10 @@ import com.intellij.jvm.analysis.JvmAnalysisTestsUtil
|
||||
class JavaTestOnlyInspectionTest : TestOnlyInspectionTestBase() {
|
||||
override fun getTestDataPath() = JvmAnalysisTestsUtil.TEST_DATA_PROJECT_RELATIVE_BASE_PATH + "/codeInspection/testonly"
|
||||
|
||||
fun `test @TestOnly not highlighting in javadoc`() {
|
||||
myFixture.testHighlighting("TestOnlyDoc.java")
|
||||
}
|
||||
|
||||
fun `test @TestOnly in production code`() {
|
||||
myFixture.testHighlighting("TestOnlyTest.java")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user