Commit e8e96dfc authored by Stefan Behnel's avatar Stefan Behnel

add test case for argument evaluation order in inlined DefNode calls

parent 10012bc3
......@@ -85,3 +85,24 @@ def test_global_calls_still_work():
return 123
global_call_result = test_global_calls_still_work()
@cython.test_fail_if_path_exists(
'//InlinedDefNodeCallNode//SimpleCallNode')
@cython.test_assert_path_exists(
'//InlinedDefNodeCallNode',
'//InlinedDefNodeCallNode[@function_name.name = "call"]',
'//InlinedDefNodeCallNode//InlinedDefNodeCallNode')
def test_sideeffect_call_order():
"""
>>> test_sideeffect_call_order()
[2, 4, 5]
"""
L = []
def sideeffect(x):
L.append(x)
return x
def call(x1, x2, x3, x4, x5):
pass
call(1, sideeffect(2), 3, sideeffect(4), sideeffect(5))
return L
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