Commit cad68bb9 authored by Stefan Behnel's avatar Stefan Behnel

extended/fixed test case

parent 54cd7130
......@@ -25,13 +25,25 @@ def double_to_pyssizet_int(double x):
cdef Py_ssize_t r = int(x)
return r
@cython.test_assert_path_exists("//SingleAssignmentNode/CastNode")
@cython.test_fail_if_path_exists("//SimpleCallNode")
def int_to_pyssizet_int(int x):
"""
>>> int_to_pyssizet_int(4.1)
4
>>> int_to_pyssizet_int(4)
4
"""
cdef Py_ssize_t r = int(x)
return r
@cython.test_assert_path_exists("//SingleAssignmentNode/CastNode")
@cython.test_fail_if_path_exists("//SimpleCallNode")
def double_to_pyssizet_float(double x):
"""
>>> double_to_pyssizet_int(4.1)
>>> double_to_pyssizet_float(4.1)
4
>>> double_to_pyssizet_int(4)
>>> double_to_pyssizet_float(4)
4
"""
cdef Py_ssize_t r = float(x)
......
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