blinking test

This commit is contained in:
Dmitry Avdeev
2013-01-28 17:47:29 +04:00
parent 8a76f0a828
commit e71106ed17
2 changed files with 3 additions and 8 deletions
@@ -16,6 +16,7 @@
package com.intellij.codeInspection;
import com.intellij.codeInsight.daemon.HighlightDisplayKey;
import com.intellij.codeInspection.dataFlow.DataFlowInspection;
import com.intellij.codeInspection.deadCode.UnusedDeclarationInspection;
import com.intellij.codeInspection.ex.*;
import com.intellij.openapi.util.JDOMUtil;
@@ -254,7 +255,8 @@ public class InspectionProfileTest extends LightIdeaTestCase {
assertEquals(0, countInitializedTools(profile));
InspectionProfileEntry[] tools = profile.getInspectionTools(null);
assertTrue(tools.length > 0);
InspectionProfileEntry tool = tools[0];
InspectionProfileEntry tool = profile.getInspectionTool(new DataFlowInspection().getShortName());
assertNotNull(tool);
String id = tool.getShortName();
System.out.println(id);
if (profile.isToolEnabled(HighlightDisplayKey.findById(id))) {
@@ -269,7 +271,6 @@ public class InspectionProfileTest extends LightIdeaTestCase {
if (initializedTools.size() != 1) {
for (InspectionProfileEntry initializedTool : initializedTools) {
System.out.println(initializedTool.getShortName());
((InspectionToolWrapper)initializedTool).instantated.printStackTrace();
}
fail();
}
@@ -67,9 +67,6 @@ public abstract class InspectionToolWrapper<T extends InspectionProfileEntry, E
public T getTool() {
if (myTool == null) {
//noinspection unchecked
if (ApplicationManager.getApplication().isUnitTestMode()) {
instantated = new Throwable();
}
myTool = (T)myEP.instantiateTool();
if (!myTool.getShortName().equals(myEP.getShortName())) {
LOG.error("Short name not matched for " +
@@ -83,9 +80,6 @@ public abstract class InspectionToolWrapper<T extends InspectionProfileEntry, E
return myTool;
}
// todo remove it
public Throwable instantated;
@Override
public boolean isInitialized() {
return myTool != null;