mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-04-25 17:25:17 +02:00
GP-1 fixed junit tests related to recent IntegerTextField changes
This commit is contained in:
@@ -388,6 +388,9 @@ public class AbstractIntegerTextField {
|
||||
}
|
||||
|
||||
private BigInteger parse(String text, IntegerFormat format) {
|
||||
if (text.equals("0") || text.equals("-0")) {
|
||||
return BigInteger.ZERO;
|
||||
}
|
||||
String prefix = format.getPrefix();
|
||||
if (usePrefix && !prefix.isBlank()) {
|
||||
if (text.startsWith(prefix)) {
|
||||
|
||||
@@ -30,7 +30,6 @@ import docking.DockingUtils;
|
||||
import docking.util.GraphicsUtils;
|
||||
import generic.theme.GThemeDefaults.Colors.Messages;
|
||||
import generic.theme.Gui;
|
||||
import ghidra.util.Swing;
|
||||
import utility.function.Callback;
|
||||
|
||||
/**
|
||||
@@ -82,17 +81,17 @@ public class MultiFormatTextField extends JTextField {
|
||||
|
||||
@Override
|
||||
public void removeUpdate(DocumentEvent e) {
|
||||
Swing.runLater(() -> c.call());
|
||||
c.call();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insertUpdate(DocumentEvent e) {
|
||||
Swing.runLater(() -> c.call());
|
||||
c.call();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changedUpdate(DocumentEvent e) {
|
||||
Swing.runLater(() -> c.call());
|
||||
c.call();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ public abstract class AbstractIntegerTextFieldTest<T extends AbstractIntegerText
|
||||
|
||||
@After
|
||||
public void tearDown() throws Exception {
|
||||
frame.setVisible(false);
|
||||
runSwing(() -> frame.dispose());
|
||||
}
|
||||
|
||||
protected void setFormat(IntegerFormat format) {
|
||||
|
||||
Reference in New Issue
Block a user