diff options
Diffstat (limited to 'testing/cffi0/test_ffi_backend.py')
-rw-r--r-- | testing/cffi0/test_ffi_backend.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/testing/cffi0/test_ffi_backend.py b/testing/cffi0/test_ffi_backend.py index e465c2d..4b43074 100644 --- a/testing/cffi0/test_ffi_backend.py +++ b/testing/cffi0/test_ffi_backend.py @@ -337,6 +337,13 @@ class TestBitfield: py.test.raises((TypeError, BufferError), ffi.from_buffer, b"abcd", require_writable=True) + def test_release(self): + ffi = FFI() + p = ffi.new("int[]", 123) + ffi.release(p) + # here, reading p[0] might give garbage or segfault... + ffi.release(p) # no effect + def test_memmove(self): ffi = FFI() p = ffi.new("short[]", [-1234, -2345, -3456, -4567, -5678]) |