IDEA-51798

This commit is contained in:
Alexey Kudravtsev
2010-02-09 13:49:55 +03:00
parent 7704c81b75
commit 4f5bde8a96
14 changed files with 70 additions and 55 deletions
@@ -11,6 +11,7 @@ import com.intellij.codeInsight.lookup.impl.LookupImpl;
import com.intellij.openapi.projectRoots.Sdk;
import com.intellij.openapi.projectRoots.impl.JavaSdkImpl;
import com.intellij.testFramework.TestDataPath;
import org.jetbrains.annotations.NonNls;
import javax.swing.*;
import java.util.ArrayList;
@@ -45,12 +46,12 @@ public abstract class CompletionSortingTestCase extends LightCompletionTestCase
protected abstract String getBasePath();
protected void checkPreferredItems(final int selected, final String... expected) throws Exception {
protected void checkPreferredItems(final int selected, @NonNls final String... expected) throws Exception {
invokeCompletion(getBasePath() + "/" + getTestName(false) + ".java");
assertPreferredItems(selected, expected);
}
protected static void assertPreferredItems(final int selected, final String... expected) {
protected static void assertPreferredItems(final int selected, @NonNls final String... expected) {
final LookupImpl lookup = getLookup();
final JList list = lookup.getList();
final List<LookupElement> model = lookup.getItems();
@@ -5,13 +5,10 @@
package com.intellij.codeInsight.completion;
import com.intellij.codeInsight.lookup.impl.LookupImpl;
import com.intellij.openapi.projectRoots.Sdk;
import com.intellij.openapi.projectRoots.impl.JavaSdkImpl;
import com.intellij.psi.statistics.StatisticsManager;
@SuppressWarnings({"ALL"})
public class SmartTypeCompletionOrderingTest extends CompletionSortingTestCase {
private static final String BASE_PATH = "/codeInsight/completion/smartTypeSorting";
private static final String BASE_PATH = "/codeInsight/completion/smartTypeSorting";
public SmartTypeCompletionOrderingTest() {
super(CompletionType.SMART);
@@ -236,8 +233,4 @@ public class SmartTypeCompletionOrderingTest extends CompletionSortingTestCase {
protected String getBasePath() {
return BASE_PATH;
}
protected Sdk getTestProjectJdk() {
return JavaSdkImpl.getMockJdk15("java 1.5");
}
}