mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-15 02:59:33 +07:00
tests: cleanup
GitOrigin-RevId: 4c0abf48343a2ad6c4ebfea78c20d66cd981c02b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
f85e6d238f
commit
c83ce9390f
@@ -168,11 +168,11 @@ public class DaemonAnnotatorsRespondToChangesTest extends DaemonAnalyzerTestCase
|
|||||||
HighlightSeverity.ERROR);
|
HighlightSeverity.ERROR);
|
||||||
long elapsed = System.currentTimeMillis() - start;
|
long elapsed = System.currentTimeMillis() - start;
|
||||||
|
|
||||||
assertEquals(0, errors.size());
|
assertSize(0, errors);
|
||||||
if (!run.get()) {
|
if (!run.get()) {
|
||||||
fail(ThreadDumper.dumpThreadsToString());
|
fail(ThreadDumper.dumpThreadsToString());
|
||||||
}
|
}
|
||||||
assertTrue("Elapsed: "+elapsed, elapsed >= SLEEP);
|
assertTrue("Elapsed: " + elapsed, elapsed >= SLEEP);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testAddRemoveHighlighterRaceInIncorrectAnnotatorsWhichUseFileRecursiveVisit() {
|
public void testAddRemoveHighlighterRaceInIncorrectAnnotatorsWhichUseFileRecursiveVisit() {
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ public class DaemonInspectionsRespondToChangesTest extends DaemonAnalyzerTestCas
|
|||||||
public void testWholeFileInspection() throws Exception {
|
public void testWholeFileInspection() throws Exception {
|
||||||
configureByFile(DaemonRespondToChangesTest.BASE_PATH + "FieldCanBeLocal.java");
|
configureByFile(DaemonRespondToChangesTest.BASE_PATH + "FieldCanBeLocal.java");
|
||||||
List<HighlightInfo> infos = doHighlighting(HighlightSeverity.WARNING);
|
List<HighlightInfo> infos = doHighlighting(HighlightSeverity.WARNING);
|
||||||
assertEquals(1, infos.size());
|
assertSize(1, infos);
|
||||||
assertEquals("Field can be converted to a local variable", infos.get(0).getDescription());
|
assertEquals("Field can be converted to a local variable", infos.get(0).getDescription());
|
||||||
|
|
||||||
ctrlW();
|
ctrlW();
|
||||||
@@ -172,7 +172,7 @@ public class DaemonInspectionsRespondToChangesTest extends DaemonAnalyzerTestCas
|
|||||||
type("0");
|
type("0");
|
||||||
|
|
||||||
infos = doHighlighting(HighlightSeverity.WARNING);
|
infos = doHighlighting(HighlightSeverity.WARNING);
|
||||||
assertEquals(1, infos.size());
|
assertSize(1, infos);
|
||||||
assertEquals("Field can be converted to a local variable", infos.get(0).getDescription());
|
assertEquals("Field can be converted to a local variable", infos.get(0).getDescription());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -124,13 +124,13 @@ public class DaemonLineMarkersRespondToChangesTest extends DaemonAnalyzerTestCas
|
|||||||
|
|
||||||
Document document = getEditor().getDocument();
|
Document document = getEditor().getDocument();
|
||||||
List<LineMarkerInfo<?>> markers = DaemonCodeAnalyzerImpl.getLineMarkers(document, getProject());
|
List<LineMarkerInfo<?>> markers = DaemonCodeAnalyzerImpl.getLineMarkers(document, getProject());
|
||||||
assertEquals(3, markers.size());
|
assertSize(3, markers);
|
||||||
|
|
||||||
type("//xxxx");
|
type("//xxxx");
|
||||||
|
|
||||||
assertEmpty(highlightErrors());
|
assertEmpty(highlightErrors());
|
||||||
markers = DaemonCodeAnalyzerImpl.getLineMarkers(document, getProject());
|
markers = DaemonCodeAnalyzerImpl.getLineMarkers(document, getProject());
|
||||||
assertEquals(3, markers.size());
|
assertSize(3, markers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -192,12 +192,13 @@ public class DaemonLineMarkersRespondToChangesTest extends DaemonAnalyzerTestCas
|
|||||||
});
|
});
|
||||||
|
|
||||||
PsiDocumentManager.getInstance(getProject()).commitAllDocuments();
|
PsiDocumentManager.getInstance(getProject()).commitAllDocuments();
|
||||||
List<HighlightInfo> infosAfter = CodeInsightTestFixtureImpl.instantiateAndRun(myFile, myEditor, new int[]{/*Pass.UPDATE_ALL, Pass.LOCAL_INSPECTIONS*/}, false);
|
List<HighlightInfo> infosAfter =
|
||||||
|
CodeInsightTestFixtureImpl.instantiateAndRun(myFile, myEditor, new int[]{/*Pass.UPDATE_ALL, Pass.LOCAL_INSPECTIONS*/}, false);
|
||||||
assertNotEmpty(filter(infosAfter, HighlightSeverity.ERROR));
|
assertNotEmpty(filter(infosAfter, HighlightSeverity.ERROR));
|
||||||
UIUtil.dispatchAllInvocationEvents();
|
UIUtil.dispatchAllInvocationEvents();
|
||||||
assertEmpty(changed);
|
assertEmpty(changed);
|
||||||
List<LineMarkerInfo<?>> lineMarkersAfter = DaemonCodeAnalyzerImpl.getLineMarkers(myEditor.getDocument(), getProject());
|
List<LineMarkerInfo<?>> lineMarkersAfter = DaemonCodeAnalyzerImpl.getLineMarkers(myEditor.getDocument(), getProject());
|
||||||
assertEquals(lineMarkersAfter.size(), lineMarkers.size());
|
assertSize(lineMarkersAfter.size(), lineMarkers);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testLineMarkersDoNotBlinkOnBackSpaceRightBeforeMethodIdentifier() {
|
public void testLineMarkersDoNotBlinkOnBackSpaceRightBeforeMethodIdentifier() {
|
||||||
|
|||||||
@@ -218,7 +218,7 @@ public class DaemonRespondToChangesTest extends DaemonAnalyzerTestCase {
|
|||||||
Document document = getDocument(getFile());
|
Document document = getDocument(getFile());
|
||||||
assertNotEmpty(highlightErrors());
|
assertNotEmpty(highlightErrors());
|
||||||
List<HighlightInfo> errors = DaemonCodeAnalyzerImpl.getHighlights(document, HighlightSeverity.ERROR, getProject());
|
List<HighlightInfo> errors = DaemonCodeAnalyzerImpl.getHighlights(document, HighlightSeverity.ERROR, getProject());
|
||||||
assertEquals(1, errors.size());
|
assertSize(1, errors);
|
||||||
TextRange dirty = myDaemonCodeAnalyzer.getFileStatusMap().getFileDirtyScope(document, getFile(), Pass.UPDATE_ALL);
|
TextRange dirty = myDaemonCodeAnalyzer.getFileStatusMap().getFileDirtyScope(document, getFile(), Pass.UPDATE_ALL);
|
||||||
assertNull(dirty);
|
assertNull(dirty);
|
||||||
|
|
||||||
@@ -313,24 +313,24 @@ public class DaemonRespondToChangesTest extends DaemonAnalyzerTestCase {
|
|||||||
|
|
||||||
public void testUnusedFieldUpdate() {
|
public void testUnusedFieldUpdate() {
|
||||||
configureByText(JavaFileType.INSTANCE, """
|
configureByText(JavaFileType.INSTANCE, """
|
||||||
class Unused {
|
class Unused {
|
||||||
private int ffff;
|
private int ffff;
|
||||||
void foo(int p) {
|
void foo(int p) {
|
||||||
if (p==0) return;
|
if (p==0) return;
|
||||||
<caret>
|
<caret>
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
""");
|
||||||
""");
|
|
||||||
Document document = getDocument(getFile());
|
Document document = getDocument(getFile());
|
||||||
List<HighlightInfo> infos = doHighlighting(HighlightSeverity.WARNING);
|
List<HighlightInfo> infos = doHighlighting(HighlightSeverity.WARNING);
|
||||||
assertEquals(1, infos.size());
|
assertSize(1, infos);
|
||||||
assertEquals("Private field 'ffff' is never used", infos.get(0).getDescription());
|
assertEquals("Private field 'ffff' is never used", infos.get(0).getDescription());
|
||||||
|
|
||||||
type(" foo(ffff++);");
|
type(" foo(ffff++);");
|
||||||
assertEmpty(highlightErrors());
|
assertEmpty(highlightErrors());
|
||||||
|
|
||||||
List<HighlightInfo> errors = DaemonCodeAnalyzerImpl.getHighlights(document, HighlightSeverity.WARNING, getProject());
|
List<HighlightInfo> errors = DaemonCodeAnalyzerImpl.getHighlights(document, HighlightSeverity.WARNING, getProject());
|
||||||
assertEquals(0, errors.size());
|
assertSize(0, errors);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testUnusedMethodUpdate() {
|
public void testUnusedMethodUpdate() {
|
||||||
@@ -351,7 +351,7 @@ public class DaemonRespondToChangesTest extends DaemonAnalyzerTestCase {
|
|||||||
PlatformTestUtil.invokeNamedAction(IdeActions.ACTION_COMMENT_LINE);
|
PlatformTestUtil.invokeNamedAction(IdeActions.ACTION_COMMENT_LINE);
|
||||||
infos = doHighlighting(HighlightSeverity.WARNING);
|
infos = doHighlighting(HighlightSeverity.WARNING);
|
||||||
|
|
||||||
assertEquals(1, infos.size());
|
assertSize(1, infos);
|
||||||
assertEquals("Method 'ffff()' is never used", infos.get(0).getDescription());
|
assertEquals("Method 'ffff()' is never used", infos.get(0).getDescription());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -359,7 +359,7 @@ public class DaemonRespondToChangesTest extends DaemonAnalyzerTestCase {
|
|||||||
public void testAssignedButUnreadFieldUpdate() throws Exception {
|
public void testAssignedButUnreadFieldUpdate() throws Exception {
|
||||||
configureByFile(BASE_PATH + "AssignedButUnreadField.java");
|
configureByFile(BASE_PATH + "AssignedButUnreadField.java");
|
||||||
List<HighlightInfo> infos = doHighlighting(HighlightSeverity.WARNING);
|
List<HighlightInfo> infos = doHighlighting(HighlightSeverity.WARNING);
|
||||||
assertEquals(1, infos.size());
|
assertSize(1, infos);
|
||||||
assertEquals("Private field 'text' is assigned but never accessed", infos.get(0).getDescription());
|
assertEquals("Private field 'text' is assigned but never accessed", infos.get(0).getDescription());
|
||||||
|
|
||||||
ctrlW();
|
ctrlW();
|
||||||
@@ -552,7 +552,7 @@ public class DaemonRespondToChangesTest extends DaemonAnalyzerTestCase {
|
|||||||
}}""");
|
}}""");
|
||||||
|
|
||||||
Collection<HighlightInfo> infos = doHighlighting(HighlightInfoType.SYMBOL_TYPE_SEVERITY);
|
Collection<HighlightInfo> infos = doHighlighting(HighlightInfoType.SYMBOL_TYPE_SEVERITY);
|
||||||
assertEquals(3, infos.size());
|
assertSize(3, infos);
|
||||||
|
|
||||||
AtomicInteger count = new AtomicInteger();
|
AtomicInteger count = new AtomicInteger();
|
||||||
MarkupModelEx modelEx = (MarkupModelEx)DocumentMarkupModel.forDocument(getDocument(getFile()), getProject(), true);
|
MarkupModelEx modelEx = (MarkupModelEx)DocumentMarkupModel.forDocument(getDocument(getFile()), getProject(), true);
|
||||||
@@ -684,7 +684,7 @@ public class DaemonRespondToChangesTest extends DaemonAnalyzerTestCase {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
Collection<HighlightInfo> errors = highlightErrors();
|
Collection<HighlightInfo> errors = highlightErrors();
|
||||||
assertEquals(3, errors.size());
|
assertSize(3, errors);
|
||||||
new GotoNextErrorHandler(true).invoke(getProject(), getEditor(), getFile());
|
new GotoNextErrorHandler(true).invoke(getProject(), getEditor(), getFile());
|
||||||
|
|
||||||
List<IntentionAction> fixes = LightQuickFixTestCase.getAvailableActions(getEditor(), getFile());
|
List<IntentionAction> fixes = LightQuickFixTestCase.getAvailableActions(getEditor(), getFile());
|
||||||
@@ -694,7 +694,7 @@ public class DaemonRespondToChangesTest extends DaemonAnalyzerTestCase {
|
|||||||
WriteCommandAction.runWriteCommandAction(getProject(), () -> finalFix.invoke(getProject(), getEditor(), getFile()));
|
WriteCommandAction.runWriteCommandAction(getProject(), () -> finalFix.invoke(getProject(), getEditor(), getFile()));
|
||||||
|
|
||||||
errors = highlightErrors();
|
errors = highlightErrors();
|
||||||
assertEquals(2, errors.size());
|
assertSize(2, errors);
|
||||||
|
|
||||||
new GotoNextErrorHandler(true).invoke(getProject(), getEditor(), getFile());
|
new GotoNextErrorHandler(true).invoke(getProject(), getEditor(), getFile());
|
||||||
fixes = LightQuickFixTestCase.getAvailableActions(getEditor(), getFile());
|
fixes = LightQuickFixTestCase.getAvailableActions(getEditor(), getFile());
|
||||||
@@ -753,7 +753,7 @@ public class DaemonRespondToChangesTest extends DaemonAnalyzerTestCase {
|
|||||||
|
|
||||||
TextRange[] highlightersAfter = getHighlightersTextRange(markup);
|
TextRange[] highlightersAfter = getHighlightersTextRange(markup);
|
||||||
|
|
||||||
assertEquals(highlightersBefore.length, highlightersAfter.length);
|
assertSize(highlightersBefore.length, highlightersAfter);
|
||||||
for (int i = 0; i < highlightersBefore.length; i++) {
|
for (int i = 0; i < highlightersBefore.length; i++) {
|
||||||
TextRange before = highlightersBefore[i];
|
TextRange before = highlightersBefore[i];
|
||||||
TextRange after = highlightersAfter[i];
|
TextRange after = highlightersAfter[i];
|
||||||
@@ -868,7 +868,7 @@ public class DaemonRespondToChangesTest extends DaemonAnalyzerTestCase {
|
|||||||
configureByText(JavaFileType.INSTANCE, "@Deprecated<caret> class S { } ");
|
configureByText(JavaFileType.INSTANCE, "@Deprecated<caret> class S { } ");
|
||||||
|
|
||||||
List<HighlightInfo> infos = doHighlighting(HighlightInfoType.SYMBOL_TYPE_SEVERITY);
|
List<HighlightInfo> infos = doHighlighting(HighlightInfoType.SYMBOL_TYPE_SEVERITY);
|
||||||
assertEquals(2, infos.size());
|
assertSize(2, infos);
|
||||||
|
|
||||||
assertEquals("@Deprecated", infos.get(0).getText());
|
assertEquals("@Deprecated", infos.get(0).getText());
|
||||||
assertEquals("S", infos.get(1).getText());
|
assertEquals("S", infos.get(1).getText());
|
||||||
@@ -888,13 +888,12 @@ public class DaemonRespondToChangesTest extends DaemonAnalyzerTestCase {
|
|||||||
type(" ");
|
type(" ");
|
||||||
|
|
||||||
after = doHighlighting(HighlightInfoType.SYMBOL_TYPE_SEVERITY);
|
after = doHighlighting(HighlightInfoType.SYMBOL_TYPE_SEVERITY);
|
||||||
assertEquals(2, after.size());
|
assertSize(2, after);
|
||||||
|
|
||||||
assertEquals("@Deprecated", after.get(0).getText());
|
assertEquals("@Deprecated", after.get(0).getText());
|
||||||
assertEquals("S", after.get(1).getText());
|
assertEquals("S", after.get(1).getText());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void testModificationInsideCodeBlockDoesNotAffectErrorMarkersOutside() {
|
public void testModificationInsideCodeBlockDoesNotAffectErrorMarkersOutside() {
|
||||||
configureByText(JavaFileType.INSTANCE, """
|
configureByText(JavaFileType.INSTANCE, """
|
||||||
class SSSSS {
|
class SSSSS {
|
||||||
@@ -939,7 +938,7 @@ public class DaemonRespondToChangesTest extends DaemonAnalyzerTestCase {
|
|||||||
}, "My", this);
|
}, "My", this);
|
||||||
|
|
||||||
List<HighlightInfo> errs = highlightErrors();
|
List<HighlightInfo> errs = highlightErrors();
|
||||||
assertEquals(2, errs.size());
|
assertSize(2, errs);
|
||||||
assertEquals("'}' expected", errs.get(0).getDescription());
|
assertEquals("'}' expected", errs.get(0).getDescription());
|
||||||
|
|
||||||
undo();
|
undo();
|
||||||
@@ -998,10 +997,10 @@ public class DaemonRespondToChangesTest extends DaemonAnalyzerTestCase {
|
|||||||
|
|
||||||
public void testApplyErrorInTheMiddle() {
|
public void testApplyErrorInTheMiddle() {
|
||||||
String text = "class <caret>X { " + """
|
String text = "class <caret>X { " + """
|
||||||
|
|
||||||
{
|
{
|
||||||
// String x = "<zzzzzzzzzz/>";
|
// String x = "<zzzzzzzzzz/>";
|
||||||
}""".repeat(100) +
|
}""".repeat(100) +
|
||||||
"\n}";
|
"\n}";
|
||||||
configureByText(JavaFileType.INSTANCE, text);
|
configureByText(JavaFileType.INSTANCE, text);
|
||||||
|
|
||||||
@@ -1012,7 +1011,7 @@ public class DaemonRespondToChangesTest extends DaemonAnalyzerTestCase {
|
|||||||
|
|
||||||
type("//");
|
type("//");
|
||||||
List<HighlightInfo> errors = highlightErrors();
|
List<HighlightInfo> errors = highlightErrors();
|
||||||
assertEquals(2, errors.size());
|
assertSize(2, errors);
|
||||||
|
|
||||||
backspace();
|
backspace();
|
||||||
backspace();
|
backspace();
|
||||||
@@ -1063,16 +1062,16 @@ public class DaemonRespondToChangesTest extends DaemonAnalyzerTestCase {
|
|||||||
((EditorImpl)myEditor).getScrollPane().getViewport().setSize(1000, 1000);
|
((EditorImpl)myEditor).getScrollPane().getViewport().setSize(1000, 1000);
|
||||||
|
|
||||||
List<HighlightInfo> infos = doHighlighting(HighlightInfoType.SYMBOL_TYPE_SEVERITY);
|
List<HighlightInfo> infos = doHighlighting(HighlightInfoType.SYMBOL_TYPE_SEVERITY);
|
||||||
assertEquals(4, infos.size());
|
assertSize(4, infos);
|
||||||
|
|
||||||
type('\n');
|
type('\n');
|
||||||
infos = doHighlighting(HighlightInfoType.SYMBOL_TYPE_SEVERITY);
|
infos = doHighlighting(HighlightInfoType.SYMBOL_TYPE_SEVERITY);
|
||||||
assertEquals(4, infos.size());
|
assertSize(4, infos);
|
||||||
|
|
||||||
deleteLine();
|
deleteLine();
|
||||||
|
|
||||||
infos = doHighlighting(HighlightInfoType.SYMBOL_TYPE_SEVERITY);
|
infos = doHighlighting(HighlightInfoType.SYMBOL_TYPE_SEVERITY);
|
||||||
assertEquals(4, infos.size());
|
assertSize(4, infos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -236,7 +236,7 @@ public class ImportHelperTest extends LightDaemonAnalyzerTestCase {
|
|||||||
private static void assertOrder(@NotNull PsiJavaFile file, @NonNls String @NotNull ... expectedOrder) {
|
private static void assertOrder(@NotNull PsiJavaFile file, @NonNls String @NotNull ... expectedOrder) {
|
||||||
PsiImportStatementBase[] statements = file.getImportList().getAllImportStatements();
|
PsiImportStatementBase[] statements = file.getImportList().getAllImportStatements();
|
||||||
|
|
||||||
assertEquals(expectedOrder.length, statements.length);
|
assertSize(expectedOrder.length, statements);
|
||||||
for (int i = 0; i < statements.length; i++) {
|
for (int i = 0; i < statements.length; i++) {
|
||||||
PsiImportStatementBase statement = statements[i];
|
PsiImportStatementBase statement = statements[i];
|
||||||
String text = StringUtil.trimEnd(StringUtil.trimStart(statement.getText(), "import "), ";");
|
String text = StringUtil.trimEnd(StringUtil.trimStart(statement.getText(), "import "), ";");
|
||||||
@@ -296,7 +296,7 @@ public class ImportHelperTest extends LightDaemonAnalyzerTestCase {
|
|||||||
type(" ");
|
type(" ");
|
||||||
backspace();
|
backspace();
|
||||||
|
|
||||||
assertEquals(1, highlightErrors().size());
|
assertSize(1, highlightErrors());
|
||||||
UIUtil.dispatchAllInvocationEvents();
|
UIUtil.dispatchAllInvocationEvents();
|
||||||
|
|
||||||
int offset = getEditor().getCaretModel().getOffset();
|
int offset = getEditor().getCaretModel().getOffset();
|
||||||
@@ -349,7 +349,7 @@ public class ImportHelperTest extends LightDaemonAnalyzerTestCase {
|
|||||||
|
|
||||||
assertEmpty(highlightErrors());
|
assertEmpty(highlightErrors());
|
||||||
|
|
||||||
assertEquals(2, ((PsiJavaFile)getFile()).getImportList().getAllImportStatements().length);
|
assertSize(2, ((PsiJavaFile)getFile()).getImportList().getAllImportStatements());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testEnsureOptimizeImportsWhenInspectionReportsErrors() throws Exception {
|
public void testEnsureOptimizeImportsWhenInspectionReportsErrors() throws Exception {
|
||||||
@@ -364,7 +364,7 @@ public class ImportHelperTest extends LightDaemonAnalyzerTestCase {
|
|||||||
|
|
||||||
List<HighlightInfo> errs = highlightErrors();
|
List<HighlightInfo> errs = highlightErrors();
|
||||||
//error corresponding to too short class name
|
//error corresponding to too short class name
|
||||||
assertEquals(1, errs.size());
|
assertSize(1, errs);
|
||||||
|
|
||||||
assertOneImportAdded("java.util.List");
|
assertOneImportAdded("java.util.List");
|
||||||
|
|
||||||
@@ -434,9 +434,9 @@ public class ImportHelperTest extends LightDaemonAnalyzerTestCase {
|
|||||||
List<HighlightInfo> errs = highlightErrors();
|
List<HighlightInfo> errs = highlightErrors();
|
||||||
|
|
||||||
//error in import list
|
//error in import list
|
||||||
assertEquals(1, errs.size());
|
assertSize(1, errs);
|
||||||
|
|
||||||
assertEquals(1, ((PsiJavaFile)getFile()).getImportList().getAllImportStatements().length);
|
assertSize(1, ((PsiJavaFile)getFile()).getImportList().getAllImportStatements());
|
||||||
|
|
||||||
type("/* */");
|
type("/* */");
|
||||||
doHighlighting();
|
doHighlighting();
|
||||||
@@ -505,7 +505,7 @@ public class ImportHelperTest extends LightDaemonAnalyzerTestCase {
|
|||||||
CodeInsightSettings.getInstance().ADD_UNAMBIGIOUS_IMPORTS_ON_THE_FLY = true;
|
CodeInsightSettings.getInstance().ADD_UNAMBIGIOUS_IMPORTS_ON_THE_FLY = true;
|
||||||
|
|
||||||
List<HighlightInfo> errs = highlightErrors();
|
List<HighlightInfo> errs = highlightErrors();
|
||||||
assertEquals(1, errs.size());
|
assertSize(1, errs);
|
||||||
|
|
||||||
assertNoImportsAdded();
|
assertNoImportsAdded();
|
||||||
type("/* */");
|
type("/* */");
|
||||||
@@ -554,7 +554,7 @@ public class ImportHelperTest extends LightDaemonAnalyzerTestCase {
|
|||||||
CodeInsightSettings.getInstance().ADD_UNAMBIGIOUS_IMPORTS_ON_THE_FLY = true;
|
CodeInsightSettings.getInstance().ADD_UNAMBIGIOUS_IMPORTS_ON_THE_FLY = true;
|
||||||
CodeInsightWorkspaceSettings.getInstance(getProject()).setOptimizeImportsOnTheFly(true, getTestRootDisposable());
|
CodeInsightWorkspaceSettings.getInstance(getProject()).setOptimizeImportsOnTheFly(true, getTestRootDisposable());
|
||||||
|
|
||||||
assertEquals(1, highlightErrors().size());
|
assertSize(1, highlightErrors());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testAutoImportIgnoresUnresolvedImportReferences() throws ExecutionException, InterruptedException {
|
public void testAutoImportIgnoresUnresolvedImportReferences() throws ExecutionException, InterruptedException {
|
||||||
|
|||||||
@@ -261,7 +261,7 @@ public class WolfTheProblemSolverTest extends DaemonAnalyzerTestCase {
|
|||||||
List<HighlightInfo> errors = highlightErrors();
|
List<HighlightInfo> errors = highlightErrors();
|
||||||
myWolfTheProblemSolver.waitForFilesQueuedForInvalidationAreProcessed();
|
myWolfTheProblemSolver.waitForFilesQueuedForInvalidationAreProcessed();
|
||||||
assertTrue(myWolfTheProblemSolver.isProblemFile(virtualFile));
|
assertTrue(myWolfTheProblemSolver.isProblemFile(virtualFile));
|
||||||
assertEquals(1, errors.size());
|
assertSize(1, errors);
|
||||||
type(';');
|
type(';');
|
||||||
errors = highlightErrors();
|
errors = highlightErrors();
|
||||||
assertEmpty(errors);
|
assertEmpty(errors);
|
||||||
|
|||||||
Reference in New Issue
Block a user