diff --git a/tests/run/c_int_types_T255.pyx b/tests/run/c_int_types_T255.pyx index 23220d5aa6cddccd4cc1d6e899f17e084bd2173b..82ca0e57372183953dd96f3d8aec09a63442d271 100644 --- a/tests/run/c_int_types_T255.pyx +++ b/tests/run/c_int_types_T255.pyx @@ -93,10 +93,10 @@ def test_char(char x): Traceback (most recent call last): ... OverflowError: ... + >>> if CHAR_MIN < 0: + ... assert test_char(-1) == -1 >>> test_char(CHAR_MIN) == CHAR_MIN True - >>> test_char(-1) - -1 >>> test_char(0) 0 >>> test_char(1) diff --git a/tests/run/dictintindex.pyx b/tests/run/dictintindex.pyx index 2a83ac9c2b2b7c40baffc09f390771d199226cc4..9e60f0d259b5645a13cfc846b63f4cef20a060d4 100644 --- a/tests/run/dictintindex.pyx +++ b/tests/run/dictintindex.pyx @@ -4,7 +4,10 @@ def test_get_char_neg(): 0 """ cdef char key = -1 - d = {-1:0} + if -1 < 0: + d = {-1:0} + else: + d = {255:0} return d[key] def test_get_char_zero(): """