From: Stefan Behnel Date: Wed, 9 Apr 2008 16:03:09 +0000 (+0200) Subject: fix for broken int-op test case X-Git-Tag: 0.9.6.14~20^2~35 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1fb56b222f4be1be4abd4ee42ed264b2f12c4c47;p=cython.git fix for broken int-op test case --- diff --git a/tests/run/cintop.pyx b/tests/run/cintop.pyx index 49d36ee6..40013469 100644 --- a/tests/run/cintop.pyx +++ b/tests/run/cintop.pyx @@ -1,6 +1,20 @@ __doc__ = """ + >>> int2 = 42 + >>> int3 = 7 + >>> char1 = ord('C') + + >>> int1 = int2 | int3 + >>> int1 |= int2 ^ int3 + >>> int1 ^= int2 & int3 + >>> int1 ^= int2 << int3 + >>> int1 ^= int2 >> int3 + >>> int1 ^= int2 << int3 | int2 >> int3 + >>> long1 = char1 | int1 + >>> print (int1, long1) == f() + True + >>> f() - (5376, 67) + (45, 111) """ def f(): @@ -12,10 +26,10 @@ def f(): char1 = c'C' int1 = int2 | int3 - int1 = int2 ^ int3 - int1 = int2 & int3 - int1 = int2 << int3 - int1 = int2 >> int3 - int1 = int2 << int3 | int2 >> int3 - long1 = char1 | long2 + int1 |= int2 ^ int3 + int1 ^= int2 & int3 + int1 ^= int2 << int3 + int1 ^= int2 >> int3 + int1 ^= int2 << int3 | int2 >> int3 + long1 = char1 | int1 return int1, long1