[pypy-svn] r76332 - pypy/trunk/pypy/module/_rawffi/test
hruske at codespeak.net
hruske at codespeak.net
Fri Jul 23 17:32:04 CEST 2010
Author: hruske
Date: Fri Jul 23 17:32:02 2010
New Revision: 76332
Modified:
pypy/trunk/pypy/module/_rawffi/test/test__rawffi.py
Log:
Add a test with negative pointers for rawffi.Array.fromaddress.
Modified: pypy/trunk/pypy/module/_rawffi/test/test__rawffi.py
==============================================================================
--- pypy/trunk/pypy/module/_rawffi/test/test__rawffi.py (original)
+++ pypy/trunk/pypy/module/_rawffi/test/test__rawffi.py Fri Jul 23 17:32:02 2010
@@ -677,7 +677,12 @@
a = A(1)
a[0] = -1234
a.free()
-
+
+ def test_long_with_fromaddress(self):
+ import _rawffi
+ addr = -1
+ raises(ValueError, _rawffi.Array('u').fromaddress, addr, 100)
+
def test_passing_raw_pointers(self):
import _rawffi
lib = _rawffi.CDLL(self.lib_name)
More information about the Pypy-commit
mailing list