mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 04:51:24 +07:00
Basic test for method extract: IDEA-CR-53127
GitOrigin-RevId: 3c41530c54d0d26076f65bc38f23993b82e7f56f
This commit is contained in:
committed by
intellij-monorepo-bot
parent
368eaa7581
commit
eac8432bb6
@@ -0,0 +1,27 @@
|
||||
// "Extract method" "false"
|
||||
|
||||
class Main {
|
||||
static boolean test() {
|
||||
throw new RuntimeException();
|
||||
}
|
||||
|
||||
private void notExtractable() {
|
||||
while (true) {
|
||||
<selection>if (test()) {
|
||||
System.out.println("ads");
|
||||
break;
|
||||
} else {
|
||||
System.out.println("Asd");
|
||||
if (test()) {
|
||||
return;
|
||||
}
|
||||
System.out.println("ASdasd");
|
||||
</selection>
|
||||
}
|
||||
somethingElse();
|
||||
}
|
||||
}
|
||||
|
||||
private static void somethingElse() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Copyright 2000-2017 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.java.codeInsight.intention;
|
||||
|
||||
import com.intellij.codeInsight.daemon.LightIntentionActionTestCase;
|
||||
import com.intellij.pom.java.LanguageLevel;
|
||||
|
||||
public class ExtractMethodIntentionActionTest extends LightIntentionActionTestCase {
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/extractMethod";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user