Commits

Alex Gaynor  committed 3ac6a9c

fix test for 32 bits

  • Participants
  • Parent commits 6290292

Comments (0)

Files changed (1)

File pypy/jit/codewriter/test/test_flatten.py

         from pypy.rlib.longlong2float import float2longlong
         def f(x):
             return float2longlong(x)
+        if longlong.is_64_bit:
+            result_var = "%i0"
+            return_op = "int_return"
+        else:
+            result_var = "%f1"
+            return_op = "float_return"
         self.encoding_test(f, [25.0], """
-            convert_float_bytes_to_longlong %f0 -> %i0
-            int_return %i0
-        """)
+            convert_float_bytes_to_longlong %%f0 -> %(result_var)s
+            %(return_op)s %(result_var)s
+        """ % {"result_var": result_var, "return_op": return_op})
 
 
 def check_force_cast(FROM, TO, operations, value):