[pypy-commit] pypy ootype-rerased: Test for oo{, un}box_int llinterp implementation.

ademan noreply at buildbot.pypy.org
Sat Jul 23 03:38:43 CEST 2011


Author: Daniel Roberts <Ademan555 at gmail.com>
Branch: ootype-rerased
Changeset: r45892:90c81e2af0f1
Date: 2011-07-22 18:38 -0700
http://bitbucket.org/pypy/pypy/changeset/90c81e2af0f1/

Log:	Test for oo{,un}box_int llinterp implementation.

diff --git a/pypy/rpython/test/test_rint.py b/pypy/rpython/test/test_rint.py
--- a/pypy/rpython/test/test_rint.py
+++ b/pypy/rpython/test/test_rint.py
@@ -8,6 +8,9 @@
 from pypy.rlib import objectmodel
 from pypy.rpython.test.tool import BaseRtypingTest, LLRtypeMixin, OORtypeMixin
 
+from pypy.rpython.lltypesystem import lltype
+from pypy.rpython.ootypesystem import ootype
+from pypy.rpython.lltypesystem.lloperation import llop
 
 class TestSnippet(object):
 
@@ -412,4 +415,8 @@
     pass
 
 class TestOOtype(BaseTestRint, OORtypeMixin):
-    pass
+    def test_oobox_int(self):
+        def f():
+            x = llop.oobox_int(ootype.Object, 42)
+            return llop.oounbox_int(lltype.Signed, x)
+        assert self.interpret(f, []) == 42


More information about the pypy-commit mailing list