AppCode:Debugger: selecting user frame on stops (OC-1652), displaying signal/exception description (OC-3807)

(cherry-picked from f6539cb)
This commit is contained in:
Anton Makeev
2012-09-14 14:30:07 +02:00
parent d9e3c8de90
commit 72304bd507
@@ -24,6 +24,7 @@ import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Disposer;
import com.intellij.openapi.util.Pair;
import com.intellij.openapi.util.Ref;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.testFramework.UsefulTestCase;
import com.intellij.util.ui.UIUtil;
@@ -278,6 +279,20 @@ public class XDebuggerTestUtil {
UsefulTestCase.assertOrderedEquals(actualNames, expectedNames);
}
public static void assertVariablesContain(List<XValue> vars, String... names) throws InterruptedException {
List<String> expectedNames = new ArrayList<String>(Arrays.asList(names));
List<String> actualNames = new ArrayList<String>();
for (XValue each : vars) {
actualNames.add(computePresentation(each).myName);
}
expectedNames.removeAll(actualNames);
UsefulTestCase.assertTrue("Missing variables:" + StringUtil.join(expectedNames, ", ")
+ "\nAll Variables: " + StringUtil.join(actualNames, ", "),
expectedNames.isEmpty());
}
public static void assertSourcePosition(final XValue value, VirtualFile file, int offset) {
final XTestNavigatable n = new XTestNavigatable();
ApplicationManager.getApplication().runReadAction(new Runnable() {