fn sys_api_call_reject_msg_size_outside_reject_callback() {
    with_hypervisor(|hypervisor, tmp_path| {
        assert_eq!(
            execute_update(
                &hypervisor,
                r#"
            (module
              (type (;0;) (func (result i32)))
              (type (;1;) (func))
              (import "ic0" "msg_reject_msg_size" (func (;0;) (type 0)))
              (func (;1;) (type 1)
                block
                    call 0
                    i32.const 8
                    i32.eq
                    br_if 0
                    unreachable
                end)
              (memory $memory 1)
              (export "memory" (memory $memory))
              (export "canister_update test" (func 1)))"#,
                "test",
                EMPTY_PAYLOAD,
                None,
                tmp_path,
            )
            .2,
            CallContextAction::Fail {
                error: HypervisorError::ContractViolation(
                    "\"ic0_msg_reject_msg_size\" cannot be executed in update mode".to_string()
                ),
                refund: Cycles::from(0),
            }
        );
    });
}
// calls reject_msg_size outside a reject callback
calls reject_msg_size outside a reject callback
calls reject_msg_size outside a reject callback
fn sys_api_call_reject_msg_size_outside_reject_callback() {
    with_hypervisor(|hypervisor, tmp_path| {
        assert_eq!(
            execute_update(
                &hypervisor,
                r#"
            (module
              (type (;0;) (func (result i32)))
              (type (;1;) (func))
              (import "ic0" "msg_reject_msg_size" (func (;0;) (type 0)))
              (func (;1;) (type 1)
                block
                    call 0
                    i32.const 8
                    i32.eq
                    br_if 0
                    unreachable
                end)
              (memory $memory 1)
              (export "memory" (memory $memory))
              (export "canister_update test" (func 1)))"#,
                "test",
                EMPTY_PAYLOAD,
                None,
                tmp_path,
            )
            .2,
            CallContextAction::Fail {
                error: HypervisorError::ContractViolation(
                    "\"ic0_msg_reject_msg_size\" cannot be executed in update mode".to_string()
                ),
                refund: Cycles::from(0),
            }
        );
    });
}
fn sys_api_call_reject_msg_size_outside_reject_callback ( ) { with_hypervisor ( | hypervisor , tmp_path | { assert_eq ! ( execute_update ( hypervisor r#"
            (module
              (type (;0;) (func (result i32)))
              (type (;1;) (func))
              (import "ic0" "msg_reject_msg_size" (func (;0;) (type 0)))
              (func (;1;) (type 1)
                block
                    call 0
                    i32.const 8
                    i32.eq
                    br_if 0
                    unreachable
                end)
              (memory $memory 1)
              (export "memory" (memory $memory))
              (export "canister_update test" (func 1)))"# " " EMPTY_PAYLOAD None tmp_path ) 2 CallContextAction Fail { error HypervisorError ContractViolation ( " \" \" " to_string ( ) ) refund Cycles from ( 0 ) } ) ; } ) ; }
calls reject_msg_size outside a reject callback
calls reject_msg_size outside a reject callback