From 1fb56b222f4be1be4abd4ee42ed264b2f12c4c47 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Wed, 9 Apr 2008 18:03:09 +0200 Subject: [PATCH] fix for broken int-op test case --- tests/run/cintop.pyx | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) 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 -- 2.26.2