[pypy-svn] r37547 - pypy/dist/pypy/rpython/test
arigo at codespeak.net
arigo at codespeak.net
Mon Jan 29 17:26:19 CET 2007
Author: arigo
Date: Mon Jan 29 17:26:18 2007
New Revision: 37547
Modified:
pypy/dist/pypy/rpython/test/test_rpbc.py
Log:
RTyping test corresponding to r37546.
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 Mon Jan 29 17:26:18 2007
@@ -1514,6 +1514,32 @@
res = self.interpret(f, [7])
assert res == 11
+ def test_single_pbc_getattr(self):
+ py.test.skip("in-progress")
+ class C:
+ def __init__(self, v1, v2):
+ self.v1 = v1
+ self.v2 = v2
+ def _freeze_(self):
+ return True
+ c1 = C(11, lambda: "hello")
+ c2 = C(22, lambda: 623)
+ def f1(l, c):
+ l.append(c.v1)
+ def f2(c):
+ return c.v2
+ def f3(c):
+ return c.v2
+ def g():
+ l = []
+ f1(l, c1)
+ f1(l, c2)
+ return l, f2(c1)(), f3(c2)()
+
+ res = self.interpret(g, [])
+ assert self.ll_to_string(res.item1) == "hello"
+ assert res.item2 == 623
+
class TestLLtype(BaseTestRPBC, LLRtypeMixin):
pass
More information about the Pypy-commit
mailing list