mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-19 01:09:52 +07:00
38 lines
1.4 KiB
Java
38 lines
1.4 KiB
Java
package com.intellij.codeInspection;
|
|
|
|
import com.intellij.JavaTestUtil;
|
|
import com.intellij.codeInspection.dataFlow.DataFlowInspection;
|
|
import com.intellij.testFramework.builders.JavaModuleFixtureBuilder;
|
|
import com.intellij.testFramework.fixtures.JavaCodeInsightFixtureTestCase;
|
|
|
|
/**
|
|
* @author peter
|
|
*/
|
|
public class DataFlowInspectionFixtureTest extends JavaCodeInsightFixtureTestCase {
|
|
@Override
|
|
protected void tuneFixture(JavaModuleFixtureBuilder moduleBuilder) {
|
|
moduleBuilder.setMockJdkLevel(JavaModuleFixtureBuilder.MockJdkLevel.jdk15);
|
|
}
|
|
|
|
@Override
|
|
protected String getTestDataPath() {
|
|
return JavaTestUtil.getJavaTestDataPath() + "/inspection/dataFlow/fixture/";
|
|
}
|
|
|
|
private void doTest() throws Throwable {
|
|
final DataFlowInspection inspection = new DataFlowInspection();
|
|
inspection.SUGGEST_NULLABLE_ANNOTATIONS = true;
|
|
myFixture.enableInspections(inspection);
|
|
myFixture.testHighlighting(true, false, false, getTestName(false) + ".java");
|
|
}
|
|
|
|
public void testTryInAnonymous() throws Throwable { doTest(); }
|
|
public void testNullableAnonymousMethod() throws Throwable { doTest(); }
|
|
public void testNullableAnonymousParameter() throws Throwable { doTest(); }
|
|
public void testNullableAnonymousVolatile() throws Throwable { doTest(); }
|
|
public void testNullableAnonymousVolatileNotNull() throws Throwable { doTest(); }
|
|
|
|
public void testFieldInAnonymous() throws Throwable { doTest(); }
|
|
|
|
}
|