From 3fe3c5739293d29cb3afb19b7062f6767797bb47 Mon Sep 17 00:00:00 2001 From: Lisandro Dalcin Date: Mon, 27 Oct 2008 14:50:30 -0300 Subject: [PATCH] more tests for get/del integer keys in dicts --- tests/run/dictintindex.pyx | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/tests/run/dictintindex.pyx b/tests/run/dictintindex.pyx index 797f929b..df739065 100644 --- a/tests/run/dictintindex.pyx +++ b/tests/run/dictintindex.pyx @@ -25,10 +25,14 @@ __doc__ = u""" 1 >>> test_get_longlong_pos() 2 +>>> test_get_longlong_big() +3 >>> test_get_ulonglong_zero() 1 >>> test_get_ulonglong_pos() 2 +>>> test_get_ulonglong_big() +3 >>> test_del_char() Traceback (most recent call last): KeyError: 0 @@ -44,9 +48,15 @@ KeyError: 0 >>> test_del_longlong() #doctest: +ELLIPSIS Traceback (most recent call last): KeyError: 0... +>>> test_del_longlong_big() #doctest: +ELLIPSIS +Traceback (most recent call last): +KeyError: ... >>> test_del_ulonglong() #doctest: +ELLIPSIS Traceback (most recent call last): KeyError: 0... +>>> test_del_ulonglong_big() #doctest: +ELLIPSIS +Traceback (most recent call last): +KeyError: ... """ def test_get_char_neg(): @@ -109,6 +119,12 @@ def test_get_longlong_pos(): cdef long long key = 1 d = {1:2} return d[key] +def test_get_longlong_big(): + cdef unsigned int shift = sizeof(long)+2 + cdef long long big = 1 + cdef long long key = big<