fn sys_api_call_arg_data_copy_fail() {
    let api_type = test_api_type_for_reject(RejectContext {
        code: RejectCode::CanisterError,
        message: "error".to_string(),
    });
    let wasm_result = execute(
        api_type,
        SystemStateBuilder::default().build(),
        r#"
                (module
                  (import "ic0" "msg_arg_data_copy"
                    (func $ic0_msg_arg_data_copy (param i32 i32 i32)))
                  (func $test
                    (call $ic0_msg_arg_data_copy (i32.const 0) (i32.const 0) (i32.const 0)))
                  (memory 1)
                  (export "canister_update test" (func $test)))"#,
        test_func_ref(),
    );
    assert_eq!(
        wasm_result,
        Err(HypervisorError::ContractViolation(
            "\"ic0_msg_arg_data_copy\" cannot be executed in reject callback mode".to_string()
        ))
    );
}
// Tests that ic0_msg_arg_data_copy cannot be accessed in a reject callback
Tests that ic0_msg_arg_data_copy cannot be accessed in a reject callback
Tests that ic0_msg_arg_data_copy cannot be accessed in a reject callback
fn sys_api_call_arg_data_copy_fail() {
    let api_type = test_api_type_for_reject(RejectContext {
        code: RejectCode::CanisterError,
        message: "error".to_string(),
    });
    let wasm_result = execute(
        api_type,
        SystemStateBuilder::default().build(),
        r#"
                (module
                  (import "ic0" "msg_arg_data_copy"
                    (func $ic0_msg_arg_data_copy (param i32 i32 i32)))
                  (func $test
                    (call $ic0_msg_arg_data_copy (i32.const 0) (i32.const 0) (i32.const 0)))
                  (memory 1)
                  (export "canister_update test" (func $test)))"#,
        test_func_ref(),
    );
    assert_eq!(
        wasm_result,
        Err(HypervisorError::ContractViolation(
            "\"ic0_msg_arg_data_copy\" cannot be executed in reject callback mode".to_string()
        ))
    );
}
fn sys_api_call_arg_data_copy_fail ( ) { let api_type = test_api_type_for_reject ( RejectContext { code : RejectCode :: CanisterError , message : " " . to_string ( ) , } ) ; let wasm_result = execute ( api_type , SystemStateBuilder :: default ( ) . build ( ) , r#"
                (module
                  (import "ic0" "msg_arg_data_copy"
                    (func $ic0_msg_arg_data_copy (param i32 i32 i32)))
                  (func $test
                    (call $ic0_msg_arg_data_copy (i32.const 0) (i32.const 0) (i32.const 0)))
                  (memory 1)
                  (export "canister_update test" (func $test)))"# , test_func_ref ( ) , ) ; assert_eq ! ( wasm_result Err ( HypervisorError ContractViolation ( " \" \" " to_string ( ) ) ) ) ; }
Tests that ic0_msg_arg_data_copy cannot be accessed in a reject callback
Tests that ic0_msg_arg_data_copy cannot be accessed in a reject callback