mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-21 12:14:37 +07:00
GitOrigin-RevId: b9271196151e985b5147b9264ea73d8e3118b59a
35 lines
1019 B
Java
35 lines
1019 B
Java
package com.siyeh.ig.controlflow;
|
|
|
|
import com.intellij.codeInspection.InspectionProfileEntry;
|
|
import com.intellij.testFramework.LightProjectDescriptor;
|
|
import com.siyeh.ig.LightJavaInspectionTestCase;
|
|
import org.jetbrains.annotations.NotNull;
|
|
import org.jetbrains.annotations.Nullable;
|
|
|
|
public class DuplicateConditionInspectionTest extends LightJavaInspectionTestCase {
|
|
@Override
|
|
protected @NotNull LightProjectDescriptor getProjectDescriptor() {
|
|
return JAVA_21_ANNOTATED;
|
|
}
|
|
|
|
public void testDuplicateCondition() {
|
|
doTest();
|
|
}
|
|
public void testDuplicateConditionNoSideEffect() {
|
|
doTest();
|
|
}
|
|
public void testDuplicateBooleanBranch() {
|
|
doTest();
|
|
}
|
|
public void testDuplicateWithNegation() {
|
|
doTest();
|
|
}
|
|
|
|
@Nullable
|
|
@Override
|
|
protected InspectionProfileEntry getInspection() {
|
|
DuplicateConditionInspection inspection = new DuplicateConditionInspection();
|
|
inspection.ignoreSideEffectConditions = getTestName(false).contains("NoSideEffect");
|
|
return inspection;
|
|
}
|
|
} |