mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-30 03:46:16 +08:00
Merge remote-tracking branch 'origin/GP-0-dragonmacher-test-fixes-5-18-26'
This commit is contained in:
+2
-16
@@ -741,13 +741,6 @@ public class AnnotationTest extends AbstractGhidraHeadedIntegrationTest {
|
|||||||
// Navigation performed by ProgramManager not tested due to use of spyServiceProvider
|
// Navigation performed by ProgramManager not tested due to use of spyServiceProvider
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testVariableAnnotation_Basic() {
|
|
||||||
String rawComment = "{@variable Stack[0xa] MyFunction}";
|
|
||||||
String display = CommentUtils.getDisplayString(rawComment, program);
|
|
||||||
assertEquals("myVariable", display);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testVariableAnnotation_BasicModify() {
|
public void testVariableAnnotation_BasicModify() {
|
||||||
String rawComment = "{@variable myVariable MyFunction}";
|
String rawComment = "{@variable myVariable MyFunction}";
|
||||||
@@ -765,21 +758,14 @@ public class AnnotationTest extends AbstractGhidraHeadedIntegrationTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testLocalAnnotation_UserMarked() {
|
public void testLocalAnnotation_VariableAddress() {
|
||||||
String rawComment = "{@variable Stack[0xa] MyFunction}";
|
|
||||||
String display = CommentUtils.getDisplayString(rawComment, program);
|
|
||||||
assertEquals("myVariable", display);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testLocalAnnotation_UserMarkedModify() {
|
|
||||||
String rawComment = "{@variable Stack[0xa] MyFunction}";
|
String rawComment = "{@variable Stack[0xa] MyFunction}";
|
||||||
String display = CommentUtils.fixupAnnotations(rawComment, program, Address.NO_ADDRESS);
|
String display = CommentUtils.fixupAnnotations(rawComment, program, Address.NO_ADDRESS);
|
||||||
assertEquals("{@variable Stack[0xa] 01002000}", display);
|
assertEquals("{@variable Stack[0xa] 01002000}", display);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testLocalAnnotation_UserMarkedModify_NoFunction() {
|
public void testLocalAnnotation_VariableAddress_NoFunction() {
|
||||||
String rawComment = "{@variable Stack[0xa]}";
|
String rawComment = "{@variable Stack[0xa]}";
|
||||||
String functionAddress = "01002000";
|
String functionAddress = "01002000";
|
||||||
Address entryPoint = addr(functionAddress);
|
Address entryPoint = addr(functionAddress);
|
||||||
|
|||||||
Reference in New Issue
Block a user