Commit c3d65de3 authored by Robert Bradshaw's avatar Robert Bradshaw

extend size_t test

parent b95b5789
...@@ -17,7 +17,35 @@ OverflowError: ... ...@@ -17,7 +17,35 @@ OverflowError: ...
Traceback (most recent call last): Traceback (most recent call last):
... ...
OverflowError: ... OverflowError: ...
>>> a = A(1,2)
>>> a.a == 1
True
>>> a.b == 2
True
>>> a.foo(5)
5
>>> a.foo(-1) #doctest: +ELLIPSIS
Traceback (most recent call last):
...
OverflowError: ...
>>> a.foo(1 << 180) #doctest: +ELLIPSIS
Traceback (most recent call last):
...
OverflowError: ...
""" """
def test(size_t i): def test(size_t i):
return i return i
cdef class A:
cdef public size_t a
cdef readonly size_t b
def __init__(self, size_t a, object b):
self.a = a
self.b = b
cpdef size_t foo(self, size_t x):
cdef object o = x
return o
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