From 7ed05e5f426da7469ca2fe76407ba8c46c8d86c1 Mon Sep 17 00:00:00 2001 From: Yaroslav Lepenkin Date: Fri, 22 Jan 2016 12:03:40 +0300 Subject: [PATCH] added tests on typing after single/double quote without pairing one --- .../codeInsight/JavaReformatOnTypingTest.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/JavaReformatOnTypingTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/JavaReformatOnTypingTest.java index 53383e13f3f1..49fae5fe172f 100644 --- a/java/java-tests/testSrc/com/intellij/codeInsight/JavaReformatOnTypingTest.java +++ b/java/java-tests/testSrc/com/intellij/codeInsight/JavaReformatOnTypingTest.java @@ -97,6 +97,18 @@ public class JavaReformatOnTypingTest extends LightPlatformCodeInsightFixtureTes "class X { String s = \"xxxxx=x\"; }"); } + public void test_InsideStringLiteral() { + doTest("class X { String x = \"x }", "=y", "class X { String x = \"x=y }"); + } + + public void test_InsideCharLiteral() { + doTest("class X { char x = ''; }", "=", "class X { char x = '='; }"); + } + + public void test_AfterOpenedBracket() { + doTest("class X { char x = ' }", "='", "class X { char x = '=' }"); + } + public void test_DistinguishAssignmentAndEquality() { doTest("class T { boolean b = 1 }", "==", "class T { boolean b = 1 == }"); }