mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-15 02:59:33 +07:00
Also: avoid manual mocking of Java 10 classes in StreamCollector10Inlining test, use mockJDK11 instead Also: rewrite SliceTestCase and its inheritors to LightJavaCodeInsightFixtureTestCase, as annotations.jar is not included into project created by DaemonAnalyzerTestCase Also: 'mutates' attribute of @Contract annotation is resolvable now, as we can use newer jetbrains-annotations library. Also: documentation tests now don't generate links to JetBrains annotations, which corresponds to the actual behavior in production GitOrigin-RevId: e460826893c1277cb2b78b18aae9d5aca97d8333
39 lines
2.3 KiB
Java
39 lines
2.3 KiB
Java
/*
|
|
* Copyright 2000-2017 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.siyeh.ig.fixes;
|
|
|
|
import com.intellij.openapi.roots.ModuleRootModificationUtil;
|
|
import com.intellij.testFramework.fixtures.DefaultLightProjectDescriptor;
|
|
import com.siyeh.InspectionGadgetsBundle;
|
|
import com.siyeh.ig.IGQuickFixesTestCase;
|
|
import com.siyeh.ig.controlflow.PointlessBooleanExpressionInspection;
|
|
|
|
public class PointlessBooleanExpressionFixTest extends IGQuickFixesTestCase {
|
|
@Override
|
|
public void setUp() throws Exception {
|
|
super.setUp();
|
|
PointlessBooleanExpressionInspection inspection = new PointlessBooleanExpressionInspection();
|
|
inspection.m_ignoreExpressionsContainingConstants = false;
|
|
myFixture.enableInspections(inspection);
|
|
myRelativePath = "pointlessboolean";
|
|
myDefaultHint = InspectionGadgetsBundle.message("constant.conditional.expression.simplify.quickfix");
|
|
ModuleRootModificationUtil.updateModel(getModule(), DefaultLightProjectDescriptor::addJetBrainsAnnotations);
|
|
}
|
|
|
|
public void testNegation() { doTest(); }
|
|
public void testNoBodyCase() { doTest(); }
|
|
public void testNoBodySideEffect() { doTest(InspectionGadgetsBundle.message("constant.conditional.expression.simplify.quickfix.sideEffect")); }
|
|
public void testPolyadic() { doTest(); }
|
|
public void testBoxed() { doTest(); }
|
|
public void testSideEffects() { doTest(InspectionGadgetsBundle.message("constant.conditional.expression.simplify.quickfix.sideEffect")); }
|
|
public void testSideEffectsField() { doTest(InspectionGadgetsBundle.message("constant.conditional.expression.simplify.quickfix.sideEffect")); }
|
|
public void testCompoundAssignment1() { doTest(InspectionGadgetsBundle.message("boolean.expression.remove.compound.assignment.quickfix")); }
|
|
public void testCompoundAssignment2() { doTest(); }
|
|
public void testCompoundAssignment3() { doTest(); }
|
|
public void testCompoundAssignmentSideEffect() { doTest(InspectionGadgetsBundle.message("boolean.expression.remove.compound.assignment.quickfix")); }
|
|
public void testCompoundAssignmentSideEffect2() { doTest(); }
|
|
public void testCompoundAssignmentSideEffect3() { doTest(InspectionGadgetsBundle.message("boolean.expression.remove.compound.assignment.quickfix")); }
|
|
}
|