[pypy-svn] r47208 - pypy/dist/pypy/rpython/rctypes/test

arigo at codespeak.net arigo at codespeak.net
Fri Oct 5 22:38:26 CEST 2007


Author: arigo
Date: Fri Oct  5 22:38:26 2007
New Revision: 47208

Modified:
   pypy/dist/pypy/rpython/rctypes/test/test_rarray.py
Log:
A known failure - at least on the llinterp our keepalive logic is not
sufficient.  Unsure if we will ever work more on this, though.


Modified: pypy/dist/pypy/rpython/rctypes/test/test_rarray.py
==============================================================================
--- pypy/dist/pypy/rpython/rctypes/test/test_rarray.py	(original)
+++ pypy/dist/pypy/rpython/rctypes/test/test_rarray.py	Fri Oct  5 22:38:26 2007
@@ -341,6 +341,24 @@
         res = interpret(func, [10])
         assert res == 50
 
+    def test_specialize_array_of_struct(self):
+        py.test.skip("known to fail, sorry :-(")
+        class T(Structure):
+            _fields_ = [('x', c_int)]
+        class S(Structure):
+            _fields_ = [('p', POINTER(T))]
+        A = S * 10
+        def func():
+            a = A()
+            for i in range(10):
+                t = T()
+                t.x = i*i
+                a[i].p = pointer(t)
+            for i in range(10):
+                assert a[i].p.contents.x == i*i
+        func()
+        interpret(func, [])
+
 class Test_compilation:
     def setup_class(self):
         from pypy.translator.c.test.test_genc import compile



More information about the Pypy-commit mailing list