From: Stefan Behnel Date: Sun, 6 Jan 2008 07:51:55 +0000 (+0100) Subject: test 'unsigned long' against maxint+1 to avoid dependency on real long size X-Git-Tag: 0.9.6.14~47^2~6 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=fa3fc1d8fc13c61f0a2826720c8b90118a5cee8f;p=cython.git test 'unsigned long' against maxint+1 to avoid dependency on real long size --- diff --git a/tests/run/r_vree_1.pyx b/tests/run/r_vree_1.pyx index a520d2e9..13c1744e 100644 --- a/tests/run/r_vree_1.pyx +++ b/tests/run/r_vree_1.pyx @@ -3,12 +3,17 @@ __doc__ = """ 0L >>> test(1) 1L - >>> 2**36 - 68719476736L - >>> test(2**36) - 0L - >>> test(2L**36) - 0L + + >>> import sys + >>> sys.maxint + 1 > sys.maxint + True + >>> type(sys.maxint * 2 + 1) is long + True + + >>> test(sys.maxint + 1) + 2147483648L + >>> test(sys.maxint * 2 + 1) + 4294967295L """ def test(k):