Home - Summaries: (main) : (py3.11) : Everything - Nightly builds - Benchmarks - RPython - Builders - About

cffi_tests.cffi1.test_verify1:test_varargs

def test_varargs():
        ffi = FFI()
        ffi.cdef("int foo(int x, ...);")
        lib = ffi.verify("""
            int foo(int x, ...) {
                va_list vargs;
                va_start(vargs, x);
                x -= va_arg(vargs, int);
                x -= va_arg(vargs, int);
                va_end(vargs);
                return x;
            }
        """)
>       assert lib.foo(50, ffi.cast("int", 5), ffi.cast("int", 3)) == 42
E       AssertionError: assert 50 == 42
E        +  where 50 = <cdata 'int(*)(int, ...)' 0x10a613f50>(50, <cdata 'int' 5>, <cdata 'int' 3>)
E        +    where <cdata 'int(*)(int, ...)' 0x10a613f50> = <Lib object for 'verify233'>.foo
E        +    and   <cdata 'int' 5> = <bound method FFI.cast of <_cffi_backend.FFI object at 0x00000003da847ce0>>('int', 5)
E        +      where <bound method FFI.cast of <_cffi_backend.FFI object at 0x00000003da847ce0>> = <extra_tests.cffi_tests.cffi1.test_verify1.FFI object at 0x00000003d82fec28>.cast
E        +    and   <cdata 'int' 3> = <bound method FFI.cast of <_cffi_backend.FFI object at 0x00000003da847ce0>>('int', 3)
E        +      where <bound method FFI.cast of <_cffi_backend.FFI object at 0x00000003da847ce0>> = <extra_tests.cffi_tests.cffi1.test_verify1.FFI object at 0x00000003d82fec28>.cast

../build/extra_tests/cffi_tests/cffi1/test_verify1.py:1001: AssertionError
builder: pypy-c-jit-macos-arm64 build #1308+
test: cffi_tests.cffi1.test_verify1:test_varargs