From 4afd68b39ec91c1923d74aa45b2d9120ef8a5036 Mon Sep 17 00:00:00 2001 From: Armin Rigo Date: Mon, 15 Jun 2015 09:04:20 +0200 Subject: Explicitly complain if we find 'typedef int... t;' in a call to verify() --- testing/cffi0/test_verify.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'testing') diff --git a/testing/cffi0/test_verify.py b/testing/cffi0/test_verify.py index 3bc10d5..d0af856 100644 --- a/testing/cffi0/test_verify.py +++ b/testing/cffi0/test_verify.py @@ -2235,3 +2235,15 @@ def test_const_struct_global(): "const T myglob = { 0.1, 42 };") assert ffi.typeof(lib.myglob) == ffi.typeof("T") assert lib.myglob.x == 42 + +def test_dont_support_int_dotdotdot(): + ffi = FFI() + ffi.cdef("typedef int... t1;") + e = py.test.raises(VerificationError, ffi.verify, "") + assert str(e.value) == ("feature not supported with ffi.verify(), but only " + "with ffi.set_source(): 'typedef int... t1'") + ffi = FFI() + ffi.cdef("typedef unsigned long... t1;") + e = py.test.raises(VerificationError, ffi.verify, "") + assert str(e.value) == ("feature not supported with ffi.verify(), but only " + "with ffi.set_source(): 'typedef unsigned long... t1'") -- cgit v1.2.1