diff --git a/tests/run/carray_slicing.pyx b/tests/run/carray_slicing.pyx index b8a214c169ee3f065e36b13c2a144b966383592f..a751fa016c90b43c7498c667b2570fa92050602e 100644 --- a/tests/run/carray_slicing.pyx +++ b/tests/run/carray_slicing.pyx @@ -259,14 +259,19 @@ def iter_doublearray_for_loop_c(): cdef struct MyStruct: int i +@cython.test_assert_path_exists("//ForFromStatNode", + "//ForFromStatNode//IndexNode") +@cython.test_fail_if_path_exists("//ForInStatNode") def struct_ptr_iter(): """ >>> struct_ptr_iter() - ([0, 1, 2, 3, 4], [0, 1, 2, 3, 4]) + ([0, 1, 2, 3, 4], [0, 1, 2, 3, 4], [0, 1, 2, 3, 4]) """ cdef MyStruct my_structs[5] for i in range(5): my_structs[i].i = i cdef MyStruct value cdef MyStruct *ptr - return [ value.i for value in my_structs[:5] ], [ ptr.i for ptr in my_structs[:5] ] + return ([ value.i for value in my_structs[:5] ], + [ ptr.i for ptr in my_structs[:5] ], + [ inferred.i for inferred in my_structs[:5] ])