[pypy-commit] pypy default: Add a passing test
arigo
noreply at buildbot.pypy.org
Fri Mar 7 21:35:34 CET 2014
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r69792:ee319eb91664
Date: 2014-03-07 21:33 +0100
http://bitbucket.org/pypy/pypy/changeset/ee319eb91664/
Log: Add a passing test
diff --git a/rpython/jit/metainterp/test/test_longlong.py b/rpython/jit/metainterp/test/test_longlong.py
--- a/rpython/jit/metainterp/test/test_longlong.py
+++ b/rpython/jit/metainterp/test/test_longlong.py
@@ -138,6 +138,15 @@
res = self.interp_operations(f, [1000000000])
assert res == 12350000000000000000.0
+ def test_float_to_longlong(self):
+ from rpython.rtyper.lltypesystem import lltype, rffi
+ def f(x):
+ compare(r_longlong(x), 0x12, 0x34567800)
+ compare(rffi.cast(lltype.SignedLongLong, x), 0x12, 0x34567800)
+ return 1
+ res = self.interp_operations(f, [0x12345678 * 256.0])
+ assert res == 1
+
def test_unsigned_compare_ops(self):
def f(n1, n2):
# n == 30002000000000
More information about the pypy-commit
mailing list