Commit ea20f2a6 authored by da-woods's avatar da-woods

Added a test for complex abs

parent b6b796a8
......@@ -120,3 +120,14 @@ def float_abs(float a):
5.5
"""
return abs(a)
@cython.test_assert_path_exists("//ReturnStatNode//NameNode[@entry.name = 'abs']",
"//ReturnStatNode//NameNode[@entry.cname = '__Pyx_c_abs_double']")
def complex_abs(complex a):
"""
>>> complex_abs(-5j)
5.0
>>> complex_abs(-5.5j)
5.5
"""
return abs(a)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment