mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-06 03:50:02 +02:00
fixed graph test issue (and a few other improviements)> Mainly protecting against creating ridiculously large icons in tests because of a strange headless environment.
This commit is contained in:
parent
5e5d474279
commit
1fd6b54f07
6 changed files with 149 additions and 75 deletions
|
@ -33,6 +33,7 @@ import ghidra.graph.visualization.GroupVertex;
|
|||
import ghidra.service.graph.*;
|
||||
import ghidra.test.AbstractGhidraHeadedIntegrationTest;
|
||||
import ghidra.test.TestEnv;
|
||||
import ghidra.util.exception.CancelledException;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
public class GraphActionsTest extends AbstractGhidraHeadedIntegrationTest {
|
||||
|
@ -445,7 +446,18 @@ public class GraphActionsTest extends AbstractGhidraHeadedIntegrationTest {
|
|||
GraphDisplayBroker broker = tool.getService(GraphDisplayBroker.class);
|
||||
GraphDisplayProvider service = broker.getGraphDisplayProvider("Default Graph Display");
|
||||
display = service.getGraphDisplay(false, TaskMonitor.DUMMY);
|
||||
display.setGraph(graph, "test graph", false, TaskMonitor.DUMMY);
|
||||
GraphDisplayOptions options = new GraphDisplayOptions(graph.getGraphType());
|
||||
|
||||
runSwing(() -> {
|
||||
|
||||
try {
|
||||
display.setGraph(graph, options, "test graph", false, TaskMonitor.DUMMY);
|
||||
}
|
||||
catch (CancelledException e) {
|
||||
// can't happen with a dummy monitor
|
||||
}
|
||||
});
|
||||
|
||||
display.setGraphDisplayListener(new TestGraphDisplayListener("test"));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue