[pypy-svn] pypy default: For some reason, this example works fine when translated,
arigo
commits-noreply at bitbucket.org
Sat Feb 12 17:40:01 CET 2011
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r41842:f8b115f22bcf
Date: 2011-02-11 15:06 +0100
http://bitbucket.org/pypy/pypy/changeset/f8b115f22bcf/
Log: For some reason, this example works fine when translated, so the
real reason of the pypy-c-jit error is more subtle. But the general
idea is most probably the same.
diff --git a/pypy/rlib/test/test_longlong2float.py b/pypy/rlib/test/test_longlong2float.py
--- a/pypy/rlib/test/test_longlong2float.py
+++ b/pypy/rlib/test/test_longlong2float.py
@@ -13,11 +13,15 @@
def test_longlong_as_float():
assert fn(maxint64) == maxint64
+def test_roundtrip():
+ value = 0x7ff06af3307a3fef
+ assert fn(value) == value
+
def test_compiled():
fn2 = compile(fn, [r_longlong])
res = fn2(maxint64)
assert res == maxint64
-
-def test_roundtrip():
- value = 0x7ff06af3307a3fef
- assert float2longlong(longlong2float(value)) == value
+ #
+ special_value = 0x7ff06af3307a3fef
+ res = fn2(special_value)
+ assert res == special_value
More information about the Pypy-commit
mailing list