Merge branch 'GP-0_ghidra1_testFix'

This commit is contained in:
ghidra1 2021-04-08 10:43:33 -04:00
commit 3a2922e175
2 changed files with 8 additions and 3 deletions

View file

@ -29,6 +29,7 @@ import ghidra.program.model.address.AddressSet;
import ghidra.program.model.listing.Program; import ghidra.program.model.listing.Program;
import ghidra.program.util.ProgramLocation; import ghidra.program.util.ProgramLocation;
import ghidra.program.util.ProgramSelection; import ghidra.program.util.ProgramSelection;
import ghidra.util.Swing;
import ghidra.util.SystemUtilities; import ghidra.util.SystemUtilities;
/** /**
@ -64,7 +65,9 @@ public class GhidraState {
this.currentHighlight = highlight; this.currentHighlight = highlight;
this.isGlobalState = true; this.isGlobalState = true;
if (!SystemUtilities.isInHeadlessMode()) { if (!SystemUtilities.isInHeadlessMode()) {
Swing.runNow(() -> {
gatherParamPanel = new GatherParamPanel(this); gatherParamPanel = new GatherParamPanel(this);
});
} }
} }

View file

@ -84,9 +84,11 @@ public class GhidraScriptAskMethodsTest extends AbstractGhidraHeadedIntegrationT
} }
private void clearScriptCachedValues() { private void clearScriptCachedValues() {
if (script != null) {
Map<?, ?> map = (Map<?, ?>) TestUtils.getInstanceField("askMap", script); Map<?, ?> map = (Map<?, ?>) TestUtils.getInstanceField("askMap", script);
map.clear(); map.clear();
} }
}
@Test @Test
public void testAskBytes_NoPreviousValue() throws Exception { public void testAskBytes_NoPreviousValue() throws Exception {