mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-10 13:17:09 +07:00
intention to replace assignment with void-call (IDEA-143069)
This commit is contained in:
+11
@@ -0,0 +1,11 @@
|
||||
// "Remove left side of assignment" "true"
|
||||
|
||||
class FooBar {
|
||||
public int baz;
|
||||
|
||||
{
|
||||
bar();
|
||||
}
|
||||
|
||||
void bar() {}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// "Remove left side of assignment" "false"
|
||||
|
||||
class FooBar {
|
||||
public String baz;
|
||||
|
||||
{
|
||||
baz = <caret>bar();
|
||||
}
|
||||
|
||||
int bar() { return 0;}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// "Remove left side of assignment" "true"
|
||||
|
||||
class FooBar {
|
||||
public int baz;
|
||||
|
||||
{
|
||||
baz = <caret>bar();
|
||||
}
|
||||
|
||||
void bar() {}
|
||||
}
|
||||
+13
@@ -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() {}
|
||||
}
|
||||
+29
@@ -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";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user