[pypy-svn] r25633 - pypy/dist/pypy/translator/c/test

arigo at codespeak.net arigo at codespeak.net
Sun Apr 9 18:52:49 CEST 2006


Author: arigo
Date: Sun Apr  9 18:52:49 2006
New Revision: 25633

Modified:
   pypy/dist/pypy/translator/c/test/test_lltyped.py
Log:
(arre, arigo)

Yet another passing-for-now-if-gcc<4.0 test.


Modified: pypy/dist/pypy/translator/c/test/test_lltyped.py
==============================================================================
--- pypy/dist/pypy/translator/c/test/test_lltyped.py	(original)
+++ pypy/dist/pypy/translator/c/test/test_lltyped.py	Sun Apr  9 18:52:49 2006
@@ -113,3 +113,15 @@
         assert res == 50
         res = fn(2)
         assert res == 60
+
+    def test_fnptr_with_fixedsizearray(self):
+        A = ForwardReference()
+        F = FuncType([Ptr(A)], Signed)
+        A.become(FixedSizeArray(Struct('s1', ('f', Ptr(F)), ('n', Signed)), 5))
+        a = malloc(A, immortal=True)
+        a[3].n = 42
+        def llf(n=int):
+            return bool(a[n].f)
+        fn = self.getcompiled(llf)
+        res = fn(4)
+        assert res == 0



More information about the Pypy-commit mailing list