From cea8b4637730c41ec800786351e18dc0ceb5c052 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Fri, 12 Nov 2010 01:22:22 -0800 Subject: [PATCH] Complex inplace operators test. --- tests/run/inplace.pyx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/run/inplace.pyx b/tests/run/inplace.pyx index 5bdc256f..43a417b3 100644 --- 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 -- 2.26.2