projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0cb6983
)
Complex inplace operators test.
author
Robert Bradshaw
<robertwb@math.washington.edu>
Fri, 12 Nov 2010 09:22:22 +0000
(
01:22
-0800)
committer
Robert Bradshaw
<robertwb@math.washington.edu>
Fri, 12 Nov 2010 09:22:22 +0000
(
01:22
-0800)
tests/run/inplace.pyx
patch
|
blob
|
history
diff --git
a/tests/run/inplace.pyx
b/tests/run/inplace.pyx
index 5bdc256fcbf9d30cf97c31afb60556c7c56e8e3a..43a417b35f649eb54eecd38afe9aa79de916a8e8 100644
(file)
--- a/
tests/run/inplace.pyx
+++ b/
tests/run/inplace.pyx
@@
-147,3
+147,16
@@
def test_inplace_pydivision(int a, int b):
"""
a %= b
return a
+
+def test_complex_inplace(double complex x, double complex y):
+ """
+ >>> test_complex_inplace(1, 1)
+ (2+0j)
+ >>> test_complex_inplace(2, 3)
+ (15+0j)
+ >>> test_complex_inplace(2+3j, 4+5j)
+ (-16+62j)
+ """
+ x += y
+ x *= y
+ return x