Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r3090:ef5175cb8e2e Date: 2018-01-17 17:44 +0100 http://bitbucket.org/cffi/cffi/changeset/ef5175cb8e2e/
Log: Add test for e8b85a3539f2 diff --git a/testing/cffi1/test_recompiler.py b/testing/cffi1/test_recompiler.py --- a/testing/cffi1/test_recompiler.py +++ b/testing/cffi1/test_recompiler.py @@ -2297,3 +2297,11 @@ else: assert lib.__loader__ is None assert lib.__spec__ is None + +def test_realize_struct_error(): + ffi = FFI() + ffi.cdef("""typedef ... foo_t; struct foo_s { void (*x)(foo_t); };""") + lib = verify(ffi, "test_realize_struct_error", """ + typedef int foo_t; struct foo_s { void (*x)(foo_t); }; + """) + py.test.raises(TypeError, ffi.new, "struct foo_s *") _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit