Author: Armin Rigo <[email protected]>
Branch: cpy-extension
Changeset: r302:53488a98319c
Date: 2012-06-12 22:33 +0200
http://bitbucket.org/cffi/cffi/changeset/53488a98319c/
Log: A passing test.
diff --git a/testing/test_verify.py b/testing/test_verify.py
--- a/testing/test_verify.py
+++ b/testing/test_verify.py
@@ -105,6 +105,12 @@
assert lib.foo(p) == p
assert lib.foo(q) != p
+def test_bogus_ptr():
+ ffi = FFI()
+ ffi.cdef("int *foo(int *);")
+ lib = ffi.verify("int *foo(int *a) { return a; }")
+ py.test.raises(TypeError, lib.foo, ffi.new("short", 42))
+
def test_verify_typedefs():
py.test.skip("XXX?")
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit