[pypy-commit] cffi cffi-1.0: Next test passes

arigo noreply at buildbot.pypy.org
Tue May 12 16:23:06 CEST 2015


Author: Armin Rigo <arigo at tunes.org>
Branch: cffi-1.0
Changeset: r1997:d09580fc365a
Date: 2015-05-12 16:17 +0200
http://bitbucket.org/cffi/cffi/changeset/d09580fc365a/

Log:	Next test passes

diff --git a/testing/cffi1/test_dlopen.py b/testing/cffi1/test_dlopen.py
--- a/testing/cffi1/test_dlopen.py
+++ b/testing/cffi1/test_dlopen.py
@@ -39,3 +39,17 @@
         "ffi.dlopen() will not be able to figure out "
         "the value of constant 'FOO' (only integer constants are "
         "supported, and only if their value are specified in the cdef)")
+
+def test_typename():
+    ffi = FFI()
+    ffi.cdef("typedef int foobar_t;")
+    target = udir.join('test_typename.py')
+    assert make_py_source(ffi, 'test_typename', str(target))
+    assert target.read() == r"""# auto-generated file
+import _cffi_backend
+
+ffi = _cffi_backend.FFI(b'test_typename',
+    _types = b'\x00\x00\x07\x01',
+    _typenames = (b'\x00\x00\x00\x00foobar_t',),
+)
+"""


More information about the pypy-commit mailing list