From f1d4a03836907c6b7a5d5ae4cb6da3fc93db7fcf Mon Sep 17 00:00:00 2001 From: Alexander Zolotov Date: Tue, 16 May 2017 14:56:51 +0300 Subject: [PATCH] Remove senseless but brittle test The test checks that postfix template is NOT expanded by enter if an abbreviation was typed fast and completion lookup was not appeared before pressing Enter. However, there is nothing wrong in expanding template if lookup was fast enough to appear before pressing Enter. The second test should be kept, as it checks that Postfix template is expanded no matter is there lookup with template in it or not. --- .../completion/TemplatesCompletionTest.java | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/template/postfix/completion/TemplatesCompletionTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/template/postfix/completion/TemplatesCompletionTest.java index 805c1a104287..4ce07b13b5a6 100644 --- a/java/java-tests/testSrc/com/intellij/codeInsight/template/postfix/completion/TemplatesCompletionTest.java +++ b/java/java-tests/testSrc/com/intellij/codeInsight/template/postfix/completion/TemplatesCompletionTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2016 JetBrains s.r.o. + * 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. @@ -150,11 +150,9 @@ public class TemplatesCompletionTest extends CompletionAutoPopupTestCase { } public void testQuickTypingWithTab() { - doQuickTypingTest("par", '\t'); - } - - public void testQuickTypingWithEnter() { - doQuickTypingTest("par", '\n'); + configureByFile(); + myFixture.type("par\t"); + checkResultByFile(); } public void testDoNotShowDisabledTemplate() { @@ -209,12 +207,6 @@ public class TemplatesCompletionTest extends CompletionAutoPopupTestCase { return JavaTestUtil.getRelativeJavaTestDataPath() + "/codeInsight/template/postfix/completion"; } - private void doQuickTypingTest(String textToType, char c) { - configureByFile(); - myFixture.type(textToType + c); - checkResultByFile(); - } - private void doCompleteTest(String textToType, char c) { configureByFile(); type(textToType);