[pypy-commit] cffi default: Add a skipped test, maybe to implement one day
arigo
noreply at buildbot.pypy.org
Wed Jul 4 06:51:52 CEST 2012
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r579:b27439e66be1
Date: 2012-07-04 06:38 +0200
http://bitbucket.org/cffi/cffi/changeset/b27439e66be1/
Log: Add a skipped test, maybe to implement one day
diff --git a/testing/backend_tests.py b/testing/backend_tests.py
--- a/testing/backend_tests.py
+++ b/testing/backend_tests.py
@@ -1031,3 +1031,14 @@
return callback('A', chr(1))
g = ffi.callback("char g(char cb(char, char))", g)
assert g(f) == 'B'
+
+ def test_vararg_callback(self):
+ py.test.skip("callback with '...'")
+ ffi = FFI(backend=self.Backend())
+ def cb(i, va_list):
+ j = ffi.va_arg(va_list, "int")
+ k = ffi.va_arg(va_list, "long long")
+ return i * 2 + j * 3 + k * 5
+ f = ffi.callback("long long cb(long i, ...)", cb)
+ res = f(10, ffi.cast("int", 100), ffi.cast("long long", 1000))
+ assert res == 20 + 300 + 5000
More information about the pypy-commit
mailing list