[pypy-commit] pypy unsigned-dtypes: Fix the tests.
arigo
noreply at buildbot.pypy.org
Sat Sep 10 09:50:54 CEST 2011
Author: Armin Rigo <arigo at tunes.org>
Branch: unsigned-dtypes
Changeset: r47195:4a19645b0df3
Date: 2011-09-10 09:50 +0200
http://bitbucket.org/pypy/pypy/changeset/4a19645b0df3/
Log: Fix the tests.
diff --git a/pypy/jit/codewriter/test/test_flatten.py b/pypy/jit/codewriter/test/test_flatten.py
--- a/pypy/jit/codewriter/test/test_flatten.py
+++ b/pypy/jit/codewriter/test/test_flatten.py
@@ -829,14 +829,15 @@
self.encoding_test(f, [rffi.cast(FROM, 42)], expectedstr,
transform=True)
elif TO in (rffi.LONG, rffi.ULONG):
+ if rffi.cast(FROM, -1) < 0:
+ fnname = "llong_from_int"
+ else:
+ fnname = "llong_from_uint"
if TO == rffi.LONG:
TO = rffi.LONGLONG
else:
TO = rffi.ULONGLONG
- if rffi.cast(FROM, -1) < 0:
- fnname = "llong_from_int"
- else:
- fnname = "llong_from_uint"
+ fnname = "u" + fnname
expected.pop() # remove int_return
expected.append(
"residual_call_irf_f $<* fn %s>, <Descr>, I[%s], R[], F[] -> %%f0"
diff --git a/pypy/jit/codewriter/test/test_longlong.py b/pypy/jit/codewriter/test/test_longlong.py
--- a/pypy/jit/codewriter/test/test_longlong.py
+++ b/pypy/jit/codewriter/test/test_longlong.py
@@ -57,7 +57,8 @@
assert op1.opname == 'residual_call_irf_f'
else:
assert op1.opname == 'residual_call_irf_i'
- gotindex = getattr(EffectInfo, 'OS_' + op1.args[0].value.upper())
+ gotindex = getattr(EffectInfo,
+ 'OS_' + op1.args[0].value.upper().lstrip('U'))
assert gotindex == oopspecindex
assert op1.args[1] == 'calldescr-%d' % oopspecindex
assert list(op1.args[2]) == [v for v in vlist
More information about the pypy-commit
mailing list