mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-20 10:37:27 +08:00
GP-0: Fix StructuredSleighTest.testEmpty
This commit is contained in:
+4
-2
@@ -15,7 +15,8 @@
|
||||
*/
|
||||
package ghidra.pcode.struct.sub;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import java.lang.invoke.MethodHandles.Lookup;
|
||||
@@ -246,7 +247,8 @@ public class StructuredSleighTest extends AbstractGhidraHeadlessIntegrationTest
|
||||
}
|
||||
};
|
||||
SleighPcodeUseropDefinition<Object> myUserop = ss.generate().get("my_userop");
|
||||
PcodeProgram program = myUserop.programFor(List.of(), PcodeUseropLibrary.nil());
|
||||
PcodeProgram program =
|
||||
myUserop.programFor(SleighPcodeUseropDefinition.EMPTY_ARGS, PcodeUseropLibrary.nil());
|
||||
assertTrue(program.getCode().isEmpty());
|
||||
}
|
||||
}
|
||||
|
||||
+1
@@ -30,6 +30,7 @@ import ghidra.program.model.pcode.Varnode;
|
||||
public interface SleighPcodeUseropDefinition<T> extends PcodeUseropDefinition<T> {
|
||||
/** The name of the output symbol */
|
||||
String OUT_SYMBOL_NAME = "__op_output";
|
||||
List<Varnode> EMPTY_ARGS = Collections.unmodifiableList(Arrays.asList(new Varnode[] { null }));
|
||||
|
||||
/**
|
||||
* A factory for building {@link SleighPcodeUseropDefinition}s.
|
||||
|
||||
Reference in New Issue
Block a user