mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-04-25 17:25:17 +02:00
Test fixes
This commit is contained in:
@@ -380,25 +380,30 @@ public class FakeSharedProject {
|
||||
public void dispose() {
|
||||
ProjectLocator projectLocator = getProjectData().getProjectLocator();
|
||||
programManager.disposeOpenPrograms();
|
||||
|
||||
String projectName = gProject.getProject().getName();
|
||||
|
||||
String projectName = "<No project>";
|
||||
Project project = gProject.getProject();
|
||||
if (project != null) {
|
||||
projectName = project.getName();
|
||||
}
|
||||
|
||||
gProject.close();
|
||||
|
||||
|
||||
File projectDir = projectLocator.getProjectDir();
|
||||
if (projectDir.exists()) {
|
||||
boolean success = FileUtilities.deleteDir(projectDir);
|
||||
if (!success) {
|
||||
Msg.error(this, "Unable to delete test project dir '%s' in %s".formatted(projectName, projectDir));
|
||||
}
|
||||
if (!success) {
|
||||
Msg.error(this, "Unable to delete test project dir '%s' in %s"
|
||||
.formatted(projectName, projectDir));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
File markerFile = projectLocator.getMarkerFile();
|
||||
if (markerFile.exists()) {
|
||||
boolean success = markerFile.delete();
|
||||
if (!success) {
|
||||
if (!success) {
|
||||
Msg.error(this, "Unable to delete test project marker file: " + markerFile);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -521,6 +521,7 @@ public class FunctionSignatureStringable extends Stringable {
|
||||
applyInline(destFunction, isInline, markupOptions);
|
||||
applyNoReturn(destFunction, hasNoReturn, markupOptions);
|
||||
|
||||
int origDestParamCount = destFunction.getParameterCount(); // must get before modifying
|
||||
applyParameterTypes(destFunction, markupOptions, forceApply);
|
||||
|
||||
boolean hasSrcVarArgs = hasVarargs;
|
||||
@@ -535,8 +536,7 @@ public class FunctionSignatureStringable extends Stringable {
|
||||
forceParameterNames(destFunction);
|
||||
}
|
||||
else {
|
||||
int paramCount = destFunction.getParameterCount();
|
||||
applyParameterNames(destFunction, markupOptions, true, paramCount);
|
||||
applyParameterNames(destFunction, markupOptions, true, origDestParamCount);
|
||||
}
|
||||
|
||||
CommentChoices commentChoice =
|
||||
|
||||
@@ -198,8 +198,8 @@ public class HistoryList<T> {
|
||||
}
|
||||
|
||||
private void doGoToIndex(int index) {
|
||||
historyIndex = index;
|
||||
T leaving = getCurrentHistoryItem();
|
||||
historyIndex = index;
|
||||
T t = historyStack.get(index);
|
||||
|
||||
dropNull();
|
||||
|
||||
Reference in New Issue
Block a user