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