Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
edd10c3b
Commit
edd10c3b
authored
Aug 11, 2012
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added new failing C++ test for iterating over the pointer to a C++ vector
parent
59831f72
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
tests/run/cpp_iterators.pyx
tests/run/cpp_iterators.pyx
+14
-0
No files found.
tests/run/cpp_iterators.pyx
View file @
edd10c3b
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment