From dc16adddbbd0f463410ae0eb0db8ca4e88e7f4e5 Mon Sep 17 00:00:00 2001 From: peter Date: Thu, 18 Oct 2012 19:58:20 +0200 Subject: [PATCH] a test for IDEA-93198: Middle matching shouldn't be so noisy --- .../CommonPrefixMoreImportantThanExpectedType.java | 8 ++++++++ .../completion/NormalCompletionOrderingTest.groovy | 4 ++++ 2 files changed, 12 insertions(+) create mode 100644 java/java-tests/testData/codeInsight/completion/normalSorting/CommonPrefixMoreImportantThanExpectedType.java diff --git a/java/java-tests/testData/codeInsight/completion/normalSorting/CommonPrefixMoreImportantThanExpectedType.java b/java/java-tests/testData/codeInsight/completion/normalSorting/CommonPrefixMoreImportantThanExpectedType.java new file mode 100644 index 000000000000..90a2ffbcee4b --- /dev/null +++ b/java/java-tests/testData/codeInsight/completion/normalSorting/CommonPrefixMoreImportantThanExpectedType.java @@ -0,0 +1,8 @@ + +public class Foo { + int myCurrentStep = null; + Object myStep = null; + void foo() { + int a = myst + } +} \ No newline at end of file diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/completion/NormalCompletionOrderingTest.groovy b/java/java-tests/testSrc/com/intellij/codeInsight/completion/NormalCompletionOrderingTest.groovy index 2527ea81227e..12121e05c889 100644 --- a/java/java-tests/testSrc/com/intellij/codeInsight/completion/NormalCompletionOrderingTest.groovy +++ b/java/java-tests/testSrc/com/intellij/codeInsight/completion/NormalCompletionOrderingTest.groovy @@ -470,4 +470,8 @@ import java.lang.annotation.Target; assertPreferredItems 0, 'myClass', 'myExtendsClause' } + public void _testCommonPrefixMoreImportantThanExpectedType() { + checkPreferredItems 0, 'myStep', 'myCurrentStep' + } + }