[pypy-svn] r53677 - pypy/branch/io-improvements/pypy/rpython/lltypesystem/test
docgok at codespeak.net
docgok at codespeak.net
Thu Apr 10 21:48:10 CEST 2008
Author: docgok
Date: Thu Apr 10 21:48:09 2008
New Revision: 53677
Modified:
pypy/branch/io-improvements/pypy/rpython/lltypesystem/test/test_rffi.py
Log:
Forgot the tests!
Modified: pypy/branch/io-improvements/pypy/rpython/lltypesystem/test/test_rffi.py
==============================================================================
--- pypy/branch/io-improvements/pypy/rpython/lltypesystem/test/test_rffi.py (original)
+++ pypy/branch/io-improvements/pypy/rpython/lltypesystem/test/test_rffi.py Thu Apr 10 21:48:09 2008
@@ -633,7 +633,18 @@
def test_ptradd_interpret():
interpret(test_ptradd, [])
-
+
+def test_nonmovingbuffer():
+ def f():
+ buf = lltype.nullptr(CCHARP.TO)
+ d = 'some cool data that should not move'
+ try:
+ buf = get_nonmovingbuffer(d)
+ for i in range(len(d)):
+ assert buf[i] == d[i]
+ finally:
+ free_nonmovingbuffer(d, buf)
+ interpret(f, [])
class TestCRffi(BaseTestRffi):
def compile(self, func, args, **kwds):
More information about the Pypy-commit
mailing list