summaryrefslogtreecommitdiff
path: root/testing/cffi0/test_verify.py
diff options
context:
space:
mode:
authorArmin Rigo <arigo@tunes.org>2015-06-15 09:04:20 +0200
committerArmin Rigo <arigo@tunes.org>2015-06-15 09:04:20 +0200
commit4afd68b39ec91c1923d74aa45b2d9120ef8a5036 (patch)
tree7805ec143ef5211ededb5e8dd02b2fcd54ffe76d /testing/cffi0/test_verify.py
parentd1716f8ee5dd98b1c6d83cd362115940cf3d8c0a (diff)
downloadcffi-4afd68b39ec91c1923d74aa45b2d9120ef8a5036.tar.gz
Explicitly complain if we find 'typedef int... t;' in a call to verify()
Diffstat (limited to 'testing/cffi0/test_verify.py')
-rw-r--r--testing/cffi0/test_verify.py12
1 files changed, 12 insertions, 0 deletions
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'")