mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-18 07:15:51 +07:00
47 lines
1.3 KiB
Java
47 lines
1.3 KiB
Java
/*
|
|
* Copyright (c) 2000-2006 JetBrains s.r.o. All Rights Reserved.
|
|
*/
|
|
|
|
package com.intellij.codeInspection;
|
|
|
|
import com.intellij.JavaTestUtil;
|
|
import com.intellij.codeInspection.deadCode.UnusedDeclarationInspection;
|
|
import com.intellij.testFramework.InspectionTestCase;
|
|
|
|
public class UnusedMethodParameterTest extends InspectionTestCase {
|
|
@Override
|
|
protected String getTestDataPath() {
|
|
return JavaTestUtil.getJavaTestDataPath() + "/inspection";
|
|
}
|
|
|
|
private void doTest() throws Exception {
|
|
UnusedDeclarationInspection declarationInspection = new UnusedDeclarationInspection();
|
|
declarationInspection.getSharedLocalInspectionTool().LOCAL_VARIABLE = false;
|
|
doTest("unusedMethodParameter/" + getTestName(true), declarationInspection);
|
|
}
|
|
|
|
public void testFieldInAnonymousClass() throws Exception {
|
|
doTest();
|
|
}
|
|
|
|
public void testUnusedParameter() throws Exception {
|
|
doTest();
|
|
}
|
|
|
|
public void testUsedForReading() throws Exception {
|
|
doTest();
|
|
}
|
|
|
|
public void testSuppressedParameter() throws Exception {
|
|
doTest();
|
|
}
|
|
|
|
public void testEntryPointUnusedParameter() throws Exception {
|
|
doTest("unusedMethodParameter/" + getTestName(true), new UnusedDeclarationInspection(), true, true);
|
|
}
|
|
|
|
public void testAppMainUnusedParams() throws Exception {
|
|
doTest();
|
|
}
|
|
}
|