Test fixes

This commit is contained in:
dragonmacher
2026-03-25 14:45:45 -04:00
parent cccc5103c1
commit 34960e3a46
3 changed files with 18 additions and 13 deletions

View File

@@ -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);
}
}
}
}

View File

@@ -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 =

View File

@@ -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();