Author: stian
Branch: math-improvements
Changeset: r93093:89a762f37f25
Date: 2017-11-20 14:32 +0100
http://bitbucket.org/pypy/pypy/changeset/89a762f37f25/

Log:    Add test for overflow with regular binops too, now there should be
        test for all changes to intobject

diff --git a/pypy/objspace/std/test/test_intobject.py 
b/pypy/objspace/std/test/test_intobject.py
--- a/pypy/objspace/std/test/test_intobject.py
+++ b/pypy/objspace/std/test/test_intobject.py
@@ -613,6 +613,10 @@
         assert type(x) is int
         assert str(x) == "0"
 
+    def test_binop_overflow(self):
+        x = int(2)
+        assert x.__lshift__(128) == 680564733841876926926749214863536422912L
+
     def test_rbinop_overflow(self):
         x = int(321)
         assert x.__rlshift__(333) == 
1422567365923326114875084456308921708325401211889530744784729710809598337369906606315292749899759616L
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to