Commit 4686d44d authored by Robert Bradshaw's avatar Robert Bradshaw

Test of unsigned long vs. int64_t.

parent ffb5aa5d
......@@ -697,8 +697,13 @@ def int64_long_sum():
cdef long x = 1
cdef int32_t x32 = 2
cdef int64_t x64 = 3
cdef unsigned long ux = 4
assert typeof(x + x32) == typeof(x32 + x) == 'long', typeof(x + x32)
assert typeof(x + x64) == typeof(x64 + x) == 'int64_t', typeof(x + x64)
# The correct answer here is either unsigned long or int64_t, depending on
# whether sizeof(long) == 64 or not. Incorrect signedness is probably
# preferable to incorrect width.
assert typeof(ux + x64) == typeof(x64 + ux) == 'int64_t', typeof(ux + x64)
cdef class InferInProperties:
"""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment