fn sys_api_call_arg_data_size_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_size" (func (;0;) (result i32)))
                  (func (;1;) (call 0) drop)
                  (export "canister_update test" (func 1)))"#,
        test_func_ref(),
    );
    let err = wasm_result.unwrap_err();
    assert_eq!(
        err,
        HypervisorError::ContractViolation(
            "\"ic0_msg_arg_data_size\" cannot be executed in reject callback mode".to_string()
        )
    );
}
// tests that ic0_msg_arg_data_size cannot be accessed in a reject callback
tests that ic0_msg_arg_data_size cannot be accessed in a reject callback
tests that ic0_msg_arg_data_size cannot be accessed in a reject callback
fn sys_api_call_arg_data_size_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_size" (func (;0;) (result i32)))
                  (func (;1;) (call 0) drop)
                  (export "canister_update test" (func 1)))"#,
        test_func_ref(),
    );
    let err = wasm_result.unwrap_err();
    assert_eq!(
        err,
        HypervisorError::ContractViolation(
            "\"ic0_msg_arg_data_size\" cannot be executed in reject callback mode".to_string()
        )
    );
}
fn sys_api_call_arg_data_size_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_size" (func (;0;) (result i32)))
                  (func (;1;) (call 0) drop)
                  (export "canister_update test" (func 1)))"# , test_func_ref ( ) , ) ; let err = wasm_result . unwrap_err ( ) ; assert_eq ! ( err HypervisorError ContractViolation ( " \" \" " to_string ( ) ) ) ; }
tests that ic0_msg_arg_data_size cannot be accessed in a reject callback
tests that ic0_msg_arg_data_size cannot be accessed in a reject callback