Commit edd10c3b authored by Stefan Behnel's avatar Stefan Behnel

added new failing C++ test for iterating over the pointer to a C++ vector

parent 59831f72
......@@ -48,3 +48,17 @@ def test_custom():
return [x for x in iter[0]]
finally:
del iter
def test_iteration_over_heap_vector(L):
"""
>>> test_iteration_over_heap_vector([1,2])
(1, 2)
"""
cdef int i
cdef vector[int] *vint = new vector[int]()
try:
for i in L:
vint.push_back(i)
return [ i for i in vint ]
finally:
del vint
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