Enable SELECT_AUTOPOPUP_SUGGESTIONS_BY_CHARS settings in tests
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
package org.jetbrains.jet.completion.confidence;
|
||||
|
||||
import com.intellij.codeInsight.CodeInsightSettings;
|
||||
import com.intellij.codeInsight.completion.CodeCompletionHandlerBase;
|
||||
import com.intellij.codeInsight.completion.CompletionType;
|
||||
import com.intellij.codeInsight.completion.LightCompletionTestCase;
|
||||
@@ -23,8 +24,9 @@ import com.intellij.openapi.projectRoots.JavaSdk;
|
||||
import com.intellij.openapi.projectRoots.Sdk;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import org.apache.commons.lang.SystemUtils;
|
||||
import org.jetbrains.jet.plugin.PluginTestCaseBase;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.jet.InTextDirectivesUtils;
|
||||
import org.jetbrains.jet.plugin.PluginTestCaseBase;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
@@ -60,9 +62,18 @@ public class JetConfidenceTest extends LightCompletionTestCase {
|
||||
}
|
||||
|
||||
protected void doTest() {
|
||||
configureByFile(getBeforeFileName());
|
||||
type(getTypeTextFromFile());
|
||||
checkResultByFile(getAfterFileName());
|
||||
boolean completeByChars = CodeInsightSettings.getInstance().SELECT_AUTOPOPUP_SUGGESTIONS_BY_CHARS;
|
||||
|
||||
CodeInsightSettings.getInstance().SELECT_AUTOPOPUP_SUGGESTIONS_BY_CHARS = true;
|
||||
|
||||
try {
|
||||
configureByFile(getBeforeFileName());
|
||||
type(getTypeTextFromFile());
|
||||
checkResultByFile(getAfterFileName());
|
||||
}
|
||||
finally {
|
||||
CodeInsightSettings.getInstance().SELECT_AUTOPOPUP_SUGGESTIONS_BY_CHARS = completeByChars;
|
||||
}
|
||||
}
|
||||
|
||||
protected static String getTypeTextFromFile() {
|
||||
@@ -82,6 +93,7 @@ public class JetConfidenceTest extends LightCompletionTestCase {
|
||||
return getTestName(false) + ".kt.after";
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
protected String getTestDataPath() {
|
||||
return new File(PluginTestCaseBase.getTestDataPathBase(), "/completion/confidence/").getPath() + File.separator;
|
||||
|
||||
Reference in New Issue
Block a user