Skip to content

Ghidra is a software reverse engineering (SRE) framework

fixed a few more junit tests

ghidravore1788695da884
diff --git a/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/string/StringTable_BE_Test.java b/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/string/StringTable_BE_Test.java
index 09fac4d214..0362c5b476 100644
--- a/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/string/StringTable_BE_Test.java
+++ b/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/string/StringTable_BE_Test.java
@@ -15,7 +15,7 @@
*/
package ghidra.app.plugin.core.string;
-import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.*;
import java.awt.Component;
import java.awt.Container;
@@ -172,13 +172,13 @@ public class StringTable_BE_Test extends AbstractGhidraHeadedIntegrationTest {
// test that the label was made correctly
Symbol sym = program.getSymbolTable().getPrimarySymbol(addr(0x400));
- assertEquals("u_abcdef@00000400", sym.getName());
+ assertEquals("u_abcdef", sym.getName());
selectRows(table, address);
int selectedRow = table.getSelectedRow();
// test that the table was updated with the label and preview
- assertEquals("u_abcdef@00000400", labelCell(model, selectedRow));
+ assertEquals("u_abcdef", labelCell(model, selectedRow));
CodeUnitTableCellData value = previewCell(model, selectedRow);
assertEquals("unicode u\"abcdef\"", value.getDisplayString());
diff --git a/Ghidra/Features/Base/src/test.slow/java/ghidra/program/database/symbol/SymbolManagerSourceTest.java b/Ghidra/Features/Base/src/test.slow/java/ghidra/program/database/symbol/SymbolManagerSourceTest.java
index 80fcc8da95..0c11e41b28 100644
--- a/Ghidra/Features/Base/src/test.slow/java/ghidra/program/database/symbol/SymbolManagerSourceTest.java
+++ b/Ghidra/Features/Base/src/test.slow/java/ghidra/program/database/symbol/SymbolManagerSourceTest.java
@@ -226,19 +226,12 @@ public class SymbolManagerSourceTest extends AbstractGhidraHeadedIntegrationTest
Symbol s = createSymbol(addr(0x0100), "UserSymbol", globalScope, SourceType.USER_DEFINED);
assertEquals("UserSymbol", s.getName());
assertEquals(true, s.getSource() == SourceType.USER_DEFINED);
-
- try {
- s.setName("LAB_0100", SourceType.DEFAULT);
- Assert.fail("Shouldn't be able to change from non-default to default.");
- }
- catch (InvalidInputException e) {
- }
-
try {
s.setSource(SourceType.DEFAULT);
Assert.fail("Shouldn't be able to set source to default.");
}
catch (IllegalArgumentException e) {
+ // Success
}
Symbol[] symbols = st.getSymbols(addr(0x0100));