intention to replace assignment with void-call (IDEA-143069)

This commit is contained in:
Anna Kozlova
2015-10-01 20:11:59 +02:00
parent 0bc58af9e6
commit a0ce4457ae
7 changed files with 154 additions and 5 deletions
@@ -0,0 +1,11 @@
// "Remove left side of assignment" "true"
class FooBar {
public int baz;
{
bar();
}
void bar() {}
}
@@ -0,0 +1,11 @@
// "Remove left side of assignment" "false"
class FooBar {
public String baz;
{
baz = <caret>bar();
}
int bar() { return 0;}
}
@@ -0,0 +1,11 @@
// "Remove left side of assignment" "true"
class FooBar {
public int baz;
{
baz = <caret>bar();
}
void bar() {}
}
@@ -0,0 +1,13 @@
// "Remove left side of assignment" "false"
class FooBar {
public int baz;
{
foo(baz = <caret>bar());
}
void foo(int i) {}
void bar() {}
}
@@ -0,0 +1,29 @@
/*
* Copyright 2000-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.codeInsight.daemon.quickFix;
public class ReplaceAssignmentFromVoidFixTest extends LightQuickFixParameterizedTestCase {
public void test() throws Exception {
doAllTests();
}
@Override
protected String getBasePath() {
return "/codeInsight/daemonCodeAnalyzer/quickFix/replaceAssignment";
}
}