mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 17:59:46 +02:00
Test fixes
This commit is contained in:
parent
c56961f06b
commit
5b3e41ff1b
6 changed files with 30 additions and 30 deletions
|
@ -24,7 +24,7 @@ import javax.swing.ImageIcon;
|
|||
|
||||
import docking.ActionContext;
|
||||
import docking.action.*;
|
||||
import docking.widgets.dialogs.TableChooserDialog;
|
||||
import docking.widgets.dialogs.TableSelectionDialog;
|
||||
import ghidra.app.plugin.core.functioncompare.FunctionComparisonProvider;
|
||||
import ghidra.app.plugin.core.functioncompare.MultiFunctionComparisonPanel;
|
||||
import ghidra.app.plugin.core.functionwindow.FunctionRowObject;
|
||||
|
@ -108,8 +108,8 @@ public class OpenFunctionTableAction extends DockingAction {
|
|||
FunctionTableModel model = new FunctionTableModel(tool, currentProgram);
|
||||
model.reload(programManagerService.getCurrentProgram());
|
||||
|
||||
TableChooserDialog<FunctionRowObject> diag =
|
||||
new TableChooserDialog<>("Select Functions: " + currentProgram.getName(),
|
||||
TableSelectionDialog<FunctionRowObject> diag =
|
||||
new TableSelectionDialog<>("Select Functions: " + currentProgram.getName(),
|
||||
model, true);
|
||||
tool.showDialog(diag);
|
||||
List<FunctionRowObject> rows = diag.getSelectionItems();
|
||||
|
|
|
@ -430,7 +430,7 @@ public class TestEnv {
|
|||
tool.addPlugin(ProgramManagerPlugin.class.getName());
|
||||
}
|
||||
catch (PluginException e) {
|
||||
e.printStackTrace();
|
||||
Msg.error(TestEnv.class, "Problem initializing test tool", e);
|
||||
}
|
||||
}, true);
|
||||
|
||||
|
@ -565,7 +565,7 @@ public class TestEnv {
|
|||
script = scriptProvider.getScriptInstance(resourceFile, writer);
|
||||
}
|
||||
catch (ClassNotFoundException | InstantiationException | IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
Msg.error(TestEnv.class, "Problem creating script", e);
|
||||
|
||||
}
|
||||
if (script == null) {
|
||||
|
|
|
@ -27,7 +27,7 @@ import org.junit.*;
|
|||
|
||||
import docking.ActionContext;
|
||||
import docking.action.DockingActionIf;
|
||||
import docking.widgets.dialogs.TableChooserDialog;
|
||||
import docking.widgets.dialogs.TableSelectionDialog;
|
||||
import docking.widgets.table.GFilterTable;
|
||||
import ghidra.app.plugin.core.codebrowser.CodeBrowserPlugin;
|
||||
import ghidra.app.plugin.core.function.FunctionPlugin;
|
||||
|
@ -182,8 +182,7 @@ public class CompareFunctionsSlowTest extends AbstractGhidraHeadedIntegrationTes
|
|||
Set<Function> functions = CompareFunctionsTestUtility.getFunctionsAsSet(foo);
|
||||
provider = compareFunctions(functions);
|
||||
|
||||
// Must do this or there will be no "active" provider in the actions
|
||||
// initiated below
|
||||
// Must do this or there will be no "active" provider in the actions initiated below
|
||||
clickComponentProvider(provider);
|
||||
|
||||
assertEquals(provider.getModel().getSourceFunctions().size(), 1);
|
||||
|
@ -192,11 +191,12 @@ public class CompareFunctionsSlowTest extends AbstractGhidraHeadedIntegrationTes
|
|||
DockingActionIf openTableAction = getAction(plugin, "Add Functions To Comparison");
|
||||
performAction(openTableAction, false);
|
||||
|
||||
TableChooserDialog<FunctionTableModel> chooser =
|
||||
waitForDialogComponent(TableChooserDialog.class);
|
||||
TableSelectionDialog<FunctionTableModel> chooser =
|
||||
waitForDialogComponent(TableSelectionDialog.class);
|
||||
GFilterTable<FunctionRowObject> table =
|
||||
(GFilterTable<FunctionRowObject>) getInstanceField("gFilterTable", chooser);
|
||||
assertEquals(table.getModel().getRowCount(), 2);
|
||||
|
||||
waitForCondition(() -> table.getModel().getRowCount() == 2);
|
||||
clickTableCell(table.getTable(), 1, 0, 1);
|
||||
|
||||
pressButtonByText(chooser, "OK");
|
||||
|
|
|
@ -286,7 +286,7 @@ public abstract class AbstractGenericTest extends AbstractGTest {
|
|||
return new File(uri);
|
||||
}
|
||||
catch (URISyntaxException e) {
|
||||
e.printStackTrace();
|
||||
Msg.error(this, "Unable to convert URL to URI", e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -159,7 +159,7 @@ def initTestJVM(Task task, String rootDirName) {
|
|||
|
||||
task.jvmArgs '-DupgradeProgramErrorMessage=' + upgradeProgramErrorMessage,
|
||||
'-DupgradeTimeErrorMessage=' + upgradeTimeErrorMessage,
|
||||
'-Dlog4j.configuration=' + logPropertiesUrl,
|
||||
'-Dlog4j.configurationFile=' + logPropertiesUrl,
|
||||
'-Dghidra.test.property.batch.mode=true',
|
||||
'-Dghidra.test.property.parallel.mode=' + parallelMode,
|
||||
'-Dghidra.test.property.output.dir=' + testOutputDir,
|
||||
|
|
|
@ -327,7 +327,7 @@ def initTestJVM(Task task, String rootDirName) {
|
|||
|
||||
task.jvmArgs '-DupgradeProgramErrorMessage=' + upgradeProgramErrorMessage,
|
||||
'-DupgradeTimeErrorMessage=' + upgradeTimeErrorMessage,
|
||||
'-Dlog4j.configuration=' + logPropertiesUrl,
|
||||
'-Dlog4j.configurationFile=' + logPropertiesUrl,
|
||||
'-Dghidra.test.property.batch.mode=true',
|
||||
'-Dghidra.test.property.parallel.mode=' + parallelMode,
|
||||
'-Dghidra.test.property.output.dir=' + testOutputDir,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue