Author: Richard Plangger <[email protected]>
Branch: ppc-vsx-support
Changeset: r88019:4bacfc342956
Date: 2016-11-01 11:14 +0100
http://bitbucket.org/pypy/pypy/changeset/4bacfc342956/

Log:    modified test to do wrap arithmetic on integers, otherwise the test
        result within python does not wrap around

diff --git a/rpython/jit/metainterp/test/test_vector.py 
b/rpython/jit/metainterp/test/test_vector.py
--- a/rpython/jit/metainterp/test/test_vector.py
+++ b/rpython/jit/metainterp/test/test_vector.py
@@ -420,7 +420,7 @@
     vec_reduce = functools.partial(vec_reduce, _vec_reduce)
 
     test_vec_int_sum = vec_reduce(st.integers(min_value=-2**(64-1), 
max_value=2**(64-1)-1),
-                             lambda a,b: a+b, lltype.Signed)
+                             lambda a,b: 
lltype.intmask(lltype.intmask(a)+lltype.intmask(b)), lltype.Signed)
     test_vec_float_sum = vec_reduce(st.floats(), lambda a,b: a+b, rffi.DOUBLE)
     test_vec_float_prod = vec_reduce(st.floats(), lambda a,b: a*b, rffi.DOUBLE)
 
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to