diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2018-10-20 10:16:26 +0200 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2018-10-20 11:06:19 +0200 |
commit | 70a64c9a75723377e2c1920182b9ca737aa0f5f6 (patch) | |
tree | 49d19e1deb362efc0188d5247049730d606a9d8f | |
parent | 1b00061ff01bdd5aac959a2b47312a38058a3306 (diff) | |
download | cython-gh2670_win_intop.tar.gz |
Add failing test for GH-2670.gh2670_win_intop
-rw-r--r-- | tests/run/cintop.pyx | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/run/cintop.pyx b/tests/run/cintop.pyx index 118425078..1884448ce 100644 --- a/tests/run/cintop.pyx +++ b/tests/run/cintop.pyx @@ -1,3 +1,5 @@ +# mode: run + def f(): """ >>> f() @@ -32,3 +34,24 @@ def f(): int1 ^= int2 << int3 | int2 >> int3 long1 = char1 | int1 return int1, long1 + + +def long_int_shift(): + """ + >>> long_int_shift() + 80082 + 10010 + 10010 + 10010 + 10010 + """ + value = 80082 # int using more than 2 bytes == long + print(value) + shiftedby3 = value >> 3 + dividedby8 = value // 8 + print(shiftedby3) + print(dividedby8) + shiftedby3 = 80082 >> 3 + dividedby8 = 80082 // 8 + print(shiftedby3) + print(dividedby8) |