Author: Armin Rigo <ar...@tunes.org>
Branch: 
Changeset: r2335:6a85e808c9ac
Date: 2015-10-09 19:27 +0200
http://bitbucket.org/cffi/cffi/changeset/6a85e808c9ac/

Log:    Another test (passing)

diff --git a/c/test_c.py b/c/test_c.py
--- a/c/test_c.py
+++ b/c/test_c.py
@@ -3470,6 +3470,12 @@
     p = newp(SignedCharA, 5)
     py.test.raises(ValueError, memmove, p, p + 1, -1)   # not segfault
 
+def test_memmove_bad_cdata():
+    BInt = new_primitive_type("int")
+    p = cast(BInt, 42)
+    py.test.raises(TypeError, memmove, p, bytearray(b'a'), 1)
+    py.test.raises(TypeError, memmove, bytearray(b'a'), p, 1)
+
 def test_dereference_null_ptr():
     BInt = new_primitive_type("int")
     BIntPtr = new_pointer_type(BInt)
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to