[pypy-commit] pypy default: A test for hex(r_uint(..)). The real goal is a bit obscure,
arigo
noreply at buildbot.pypy.org
Tue Oct 8 15:07:48 CEST 2013
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r67203:d1174f51656b
Date: 2013-10-08 15:07 +0200
http://bitbucket.org/pypy/pypy/changeset/d1174f51656b/
Log: A test for hex(r_uint(..)). The real goal is a bit obscure, because
on top of Python the string contains a final 'L', but should we give
this behavior in RPython??
diff --git a/rpython/rtyper/test/test_rint.py b/rpython/rtyper/test/test_rint.py
--- a/rpython/rtyper/test/test_rint.py
+++ b/rpython/rtyper/test/test_rint.py
@@ -85,6 +85,14 @@
res = self.ll_to_string(res)
assert res == '-0x8' + '0' * (len(res)-4)
+ def test_hex_of_uint(self):
+ def dummy(i):
+ return hex(r_uint(i))
+
+ res = self.interpret(dummy, [-5])
+ res = self.ll_to_string(res)
+ assert res == '0x' + 'f' * (len(res)-3) + 'b'
+
def test_oct_of_int(self):
def dummy(i):
return oct(i)
More information about the pypy-commit
mailing list