implements PLN-0022
This commit is contained in:
@@ -2567,11 +2567,8 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn test_status_first_syscall_results_count_mismatch_panic() {
|
||||
// GfxSetSprite (0x1007) expects 1 result.
|
||||
let code = assemble(
|
||||
"PUSH_I32 0\nPUSH_I32 0\nPUSH_I32 0\nPUSH_I32 0\nPUSH_I32 0\nPUSH_I32 0\nPUSH_I32 0\nPUSH_I32 0\nPUSH_I32 0\nPUSH_I32 0\nSYSCALL 0x1007",
|
||||
)
|
||||
.expect("assemble");
|
||||
// ComposerBindScene (0x1101) expects 1 result.
|
||||
let code = assemble("PUSH_I32 0\nSYSCALL 0x1101").expect("assemble");
|
||||
|
||||
struct BadNativeNoReturn;
|
||||
impl NativeInterface for BadNativeNoReturn {
|
||||
@@ -2921,10 +2918,24 @@ mod tests {
|
||||
fn test_loader_patching_accepts_status_first_signatures() {
|
||||
let cases = vec![
|
||||
SyscallDecl {
|
||||
module: "gfx".into(),
|
||||
name: "set_sprite".into(),
|
||||
module: "composer".into(),
|
||||
name: "bind_scene".into(),
|
||||
version: 1,
|
||||
arg_slots: 10,
|
||||
arg_slots: 1,
|
||||
ret_slots: 1,
|
||||
},
|
||||
SyscallDecl {
|
||||
module: "composer".into(),
|
||||
name: "unbind_scene".into(),
|
||||
version: 1,
|
||||
arg_slots: 0,
|
||||
ret_slots: 1,
|
||||
},
|
||||
SyscallDecl {
|
||||
module: "composer".into(),
|
||||
name: "emit_sprite".into(),
|
||||
version: 1,
|
||||
arg_slots: 9,
|
||||
ret_slots: 1,
|
||||
},
|
||||
SyscallDecl {
|
||||
@@ -2977,10 +2988,10 @@ mod tests {
|
||||
fn test_loader_patching_rejects_legacy_status_first_ret_slots() {
|
||||
let cases = vec![
|
||||
SyscallDecl {
|
||||
module: "gfx".into(),
|
||||
name: "set_sprite".into(),
|
||||
module: "composer".into(),
|
||||
name: "bind_scene".into(),
|
||||
version: 1,
|
||||
arg_slots: 10,
|
||||
arg_slots: 1,
|
||||
ret_slots: 0,
|
||||
},
|
||||
SyscallDecl {
|
||||
|
||||
Reference in New Issue
Block a user