[pypy-commit] pypy int-tag-untag-as-operations: same fix is needed here

cfbolz noreply at buildbot.pypy.org
Fri Nov 25 12:54:20 CET 2011


Author: Carl Friedrich Bolz <cfbolz at gmx.de>
Branch: int-tag-untag-as-operations
Changeset: r49787:a34d6a413e8a
Date: 2011-11-17 16:56 +0100
http://bitbucket.org/pypy/pypy/changeset/a34d6a413e8a/

Log:	same fix is needed here

diff --git a/pypy/jit/metainterp/optimizeopt/test/test_optimizeopt.py b/pypy/jit/metainterp/optimizeopt/test/test_optimizeopt.py
--- a/pypy/jit/metainterp/optimizeopt/test/test_optimizeopt.py
+++ b/pypy/jit/metainterp/optimizeopt/test/test_optimizeopt.py
@@ -216,7 +216,10 @@
             args = []
             for argtype in argtypes:
                 assert argtype in ('int', 'bool')
-                args.append(random.randrange(1, 20))
+                arg = random.randrange(1, 20)
+                if opnum == rop.INT_UNTAG:
+                    arg = arg | 1 # must be an odd int
+                args.append(arg)
             assert restype in ('int', 'bool')
             ops = """
             []


More information about the pypy-commit mailing list