[pypy-svn] r24978 - pypy/dist/pypy/rpython/test

pedronis at codespeak.net pedronis at codespeak.net
Fri Mar 24 22:23:49 CET 2006


Author: pedronis
Date: Fri Mar 24 22:23:48 2006
New Revision: 24978

Modified:
   pypy/dist/pypy/rpython/test/test_rpbc.py
Log:
in-progress test on disjoint access pbcs



Modified: pypy/dist/pypy/rpython/test/test_rpbc.py
==============================================================================
--- pypy/dist/pypy/rpython/test/test_rpbc.py	(original)
+++ pypy/dist/pypy/rpython/test/test_rpbc.py	Fri Mar 24 22:23:48 2006
@@ -1363,6 +1363,32 @@
     res = interp.eval_graph(ll_h_graph, [None, c_f, c_a])
     assert typeOf(res) == A_repr.lowleveltype
 
+def test_disjoint_pbcs():
+    py.test.skip("in-progress")
+    class Frozen(object):
+        def __init__(self, v):
+            self.v = 2
+        def _freeze_(self):
+            return True
+        
+    f1 = Frozen(2)
+    f2 = Frozen(3)
+
+    def g1(x):
+        return x.v
+    def g2(y):
+        return y.v
+    def h(x):
+        return x != None
+
+    def f():
+        a = g1(f1)
+        b = g2(f2)
+        return h(f1)+h(f2)+a+b
+        
+    res = interpret(f, [])
+
+    assert res == 7
 
 class TestLltype(BaseTestRPBC):
 



More information about the Pypy-commit mailing list