[pypy-commit] pypy float-bytes-2: runner test for this
alex_gaynor
noreply at buildbot.pypy.org
Tue Mar 27 07:28:21 CEST 2012
Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch: float-bytes-2
Changeset: r54030:aca32821c9d1
Date: 2012-03-27 01:22 -0400
http://bitbucket.org/pypy/pypy/changeset/aca32821c9d1/
Log: runner test for this
diff --git a/pypy/jit/backend/test/runner_test.py b/pypy/jit/backend/test/runner_test.py
--- a/pypy/jit/backend/test/runner_test.py
+++ b/pypy/jit/backend/test/runner_test.py
@@ -27,6 +27,12 @@
def constfloat(x):
return ConstFloat(longlong.getfloatstorage(x))
+def boxlonglong(ll):
+ if longlong.is_64_bit:
+ return BoxInt(ll)
+ else:
+ return BoxFloat(ll)
+
class Runner(object):
@@ -1623,6 +1629,11 @@
[boxfloat(2.5)], t).value
assert res == longlong2float.float2longlong(2.5)
+ bytes = longlong2float.float2longlong(2.5)
+ res = self.execute_operation(rop.CONVERT_LONGLONG_BYTES_TO_FLOAT,
+ [boxlonglong(res)], 'float').value
+ assert res == 2.5
+
def test_ooops_non_gc(self):
x = lltype.malloc(lltype.Struct('x'), flavor='raw')
v = heaptracker.adr2int(llmemory.cast_ptr_to_adr(x))
More information about the pypy-commit
mailing list