fixed tests related to recent merge of GP-1073

This commit is contained in:
ghidravore
2021-10-12 13:59:37 -04:00
parent 23228098be
commit 36c09abc31
2 changed files with 6 additions and 13 deletions
@@ -324,15 +324,15 @@ public class DeleteLabelCmdTest extends AbstractGhidraHeadedIntegrationTest {
assertEquals(1, symbols.length);
assertEquals("MyFunction", symbols[0].getName());
createSymbol(addr, "ThirdSymbol");
createSymbol(addr, "OtherSymbol");
createSymbol(addr, "ThirdSymbol");
symbols = getSymbols(addr);
assertEquals(3, symbols.length);
assertEquals("MyFunction", symbols[0].getName());
assertEquals(true, symbols[0].isPrimary());
assertEquals("ThirdSymbol", symbols[1].getName());
assertEquals("OtherSymbol", symbols[2].getName());
assertEquals("OtherSymbol", symbols[1].getName());
assertEquals("ThirdSymbol", symbols[2].getName());
// Add a reference from 01002257 Operand1 to 01002239
ReferenceManager refMgr = notepad.getReferenceManager();
@@ -766,17 +766,10 @@ public class FGProvider extends VisualGraphComponentProvider<FGVertex, FGEdge, F
Address minAddress = vertexAddresses.getMinAddress();
Symbol primary = symbolTable.getPrimarySymbol(minAddress);
if (!primary.isDynamic()) {
return;
// if there is a symbol, then the block should not be merged
if (primary == null) {
controller.mergeVertexWithParent(destinationVertex);
}
ReferenceManager referenceManager = currentProgram.getReferenceManager();
ReferenceIterator references = referenceManager.getReferencesTo(minAddress);
if (references.hasNext()) {
return; // other references to this vertex entry point
}
controller.mergeVertexWithParent(destinationVertex);
}
private void handleReferenceAdded(DomainObjectChangeRecord record) {