mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
GP-0: Fix default visibility on children of VOID.
This commit is contained in:
parent
5888ac64e1
commit
1ed7768b9a
2 changed files with 33 additions and 1 deletions
|
@ -46,6 +46,7 @@ public class DBTraceObjectManagerTest extends AbstractGhidraHeadlessIntegrationT
|
|||
<schema name='Session' elementResync='NEVER' attributeResync='ONCE'>
|
||||
<attribute name='curTarget' schema='Target' />
|
||||
<attribute name='Targets' schema='TargetContainer' />
|
||||
<attribute schema='VOID' />
|
||||
</schema>
|
||||
<schema name='TargetContainer' canonical='yes' elementResync='NEVER'
|
||||
attributeResync='ONCE'>
|
||||
|
@ -1063,4 +1064,33 @@ public class DBTraceObjectManagerTest extends AbstractGhidraHeadlessIntegrationT
|
|||
assertFalse(split.isDeleted()); // Other values not affected
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAttributeDefaultVisibility() {
|
||||
try (Transaction tx = b.startTransaction()) {
|
||||
TraceObjectValue rootVal =
|
||||
manager.createRootObject(ctx.getSchema(new SchemaName("Session")));
|
||||
root = rootVal.getChild();
|
||||
|
||||
TraceObject object = manager.createObject(TraceObjectKeyPath.parse("OutsideSchema"));
|
||||
object.insert(Lifespan.ALL, ConflictResolution.DENY);
|
||||
assertFalse(object.getCanonicalParent(0).isHidden());
|
||||
|
||||
TraceObject elemOutside =
|
||||
manager.createObject(TraceObjectKeyPath.parse("OutsideSchema[0]"));
|
||||
elemOutside.insert(Lifespan.ALL, ConflictResolution.DENY);
|
||||
assertFalse(elemOutside.getCanonicalParent(0).isHidden());
|
||||
|
||||
TraceObject attrOutside =
|
||||
manager.createObject(TraceObjectKeyPath.parse("OutsideSchema.Attr"));
|
||||
attrOutside.insert(Lifespan.ALL, ConflictResolution.DENY);
|
||||
assertFalse(attrOutside.getCanonicalParent(0).isHidden());
|
||||
|
||||
// TODO: This underscore convention is deprecated, but still in use
|
||||
TraceObject hiddenOutside =
|
||||
manager.createObject(TraceObjectKeyPath.parse("OutsideSchema._Attr"));
|
||||
hiddenOutside.insert(Lifespan.ALL, ConflictResolution.DENY);
|
||||
assertTrue(hiddenOutside.getCanonicalParent(0).isHidden());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue