test 'unsigned long' also against 8**sizeof(unsigned long) - 1
authorStefan Behnel <scoder@users.berlios.de>
Sun, 6 Jan 2008 08:02:59 +0000 (09:02 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Sun, 6 Jan 2008 08:02:59 +0000 (09:02 +0100)
tests/run/r_vree_1.pyx

index 13c1744e9b994582af98ed707c7f07d6fda77115..74d1ba13bb6b4aac0177ee5aaed6e066f0eaca12 100644 (file)
@@ -14,9 +14,15 @@ __doc__ = """
     2147483648L
     >>> test(sys.maxint * 2 + 1)
     4294967295L
+
+    >>> test(8 ** unsigned_long_size() - 1) > sys.maxint
+    True
 """
 
 def test(k):
     cdef unsigned long m
     m = k
     return m
+
+def unsigned_long_size():
+    return sizeof(unsigned long)