Commit addf3966 authored by Stefan Behnel's avatar Stefan Behnel

Remove test code that fails to compile in Py3.11 (and that isn't really worth testing).

parent 546765d8
......@@ -5,10 +5,6 @@
from cpython.longintrepr cimport *
cimport cython
cdef extern from *:
Py_ssize_t* Py_SIZE_PTR "&Py_SIZE"(object)
@cython.cdivision(True)
def lshift(long a, unsigned long n):
"""
......@@ -16,12 +12,10 @@ def lshift(long a, unsigned long n):
>>> print(lshift(3, 1))
6
>>> print(lshift(-3, 1))
-6
>>> print(lshift(1, 30))
1073741824
>>> print(lshift(-12345, 115))
-512791237748899576593671817473776680960
512791237748899576593671817473776680960
>>> print(-12345 << 115)
-512791237748899576593671817473776680960
>>> [i for i in range(100) if (65535 << i) != lshift(65535, i)]
......@@ -58,7 +52,4 @@ def lshift(long a, unsigned long n):
index -= 1
ret.ob_digit[index] = 0
if a < 0:
Py_SIZE_PTR(ret)[0] *= -1
return ret
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