Extract Java-specific part out of BackspaceTest

GitOrigin-RevId: dbf90977b63194afa98d2db3e397f25782d61ac9
This commit is contained in:
Dmitry Jemerov
2022-04-28 17:21:29 +02:00
committed by intellij-monorepo-bot
parent 65270d424e
commit 0b16d0a9dd
17 changed files with 124 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
class A{
{
(<caret>)
}
}

View File

@@ -0,0 +1,5 @@
class A{
{
<caret>
}
}

View File

@@ -0,0 +1,5 @@
class A{
{
"(<caret>)"
}
}

View File

@@ -0,0 +1,5 @@
class A{
{
"<caret>)"
}
}

View File

@@ -0,0 +1,5 @@
class A{
{
((<caret>)
}
}

View File

@@ -0,0 +1,5 @@
class A{
{
(<caret>)
}
}

View File

@@ -0,0 +1,5 @@
class A{
{
(v.f(<caret>))
}
}

View File

@@ -0,0 +1,5 @@
class A{
{
(v.f<caret>)
}
}

View File

@@ -0,0 +1,8 @@
public class LineWrap {
public static void main(String[] args) {
for (int i = 0; i < args.length; i++) {
System.out.println(args[i]);
<caret> }
}
}

View File

@@ -0,0 +1,7 @@
public class LineWrap {
public static void main(String[] args) {
for (int i = 0; i < args.length; i++) {
System.out.println(args[i]);
<caret>}
}
}

View File

@@ -0,0 +1,5 @@
class A{
{
"<caret>"
}
}

View File

@@ -0,0 +1,5 @@
class A{
{
<caret>
}
}

View File

@@ -0,0 +1,5 @@
class A{
{
""<caret>"
}
}

View File

@@ -0,0 +1,5 @@
class A{
{
"<caret>"
}
}

View File

@@ -0,0 +1,5 @@
class A{
{
String s = "<caret>"; // "foo"
}
}

View File

@@ -0,0 +1,5 @@
class A{
{
String s = <caret>; // "foo"
}
}

View File

@@ -0,0 +1,39 @@
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.codeInsight;
import com.intellij.JavaTestUtil;
import com.intellij.testFramework.LightPlatformCodeInsightTestCase;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
public class JavaBackspaceTest extends LightPlatformCodeInsightTestCase {
@Override
protected @NotNull String getTestDataPath() {
return JavaTestUtil.getJavaTestDataPath();
}
public void testBracket1() { doTest(); }
public void testBracket2() { doTest(); }
public void testBracket3() { doTest(); }
public void testBracket4() { doTest(); }
public void testIdea186011() { doTest(); }
public void testQuote1() { doTest(); }
public void testQuote2() { doTest(); }
public void testQuoteAndCommentAfter() { doTest(); }
private void doTest() {
@NonNls String path = "/codeInsight/backspace/";
configureByFile(path + getTestName(false) + ".java");
backspace();
checkResultByFile(path + getTestName(false) + "_after.java");
}
}