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
1b646b6a
Commit
1b646b6a
authored
Nov 23, 2013
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
extend test
parent
5b46bcfc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
tests/run/carray_slicing.pyx
tests/run/carray_slicing.pyx
+7
-2
No files found.
tests/run/carray_slicing.pyx
View file @
1b646b6a
...
@@ -259,14 +259,19 @@ def iter_doublearray_for_loop_c():
...
@@ -259,14 +259,19 @@ def iter_doublearray_for_loop_c():
cdef
struct
MyStruct
:
cdef
struct
MyStruct
:
int
i
int
i
@
cython
.
test_assert_path_exists
(
"//ForFromStatNode"
,
"//ForFromStatNode//IndexNode"
)
@
cython
.
test_fail_if_path_exists
(
"//ForInStatNode"
)
def
struct_ptr_iter
():
def
struct_ptr_iter
():
"""
"""
>>> 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
]
cdef
MyStruct
my_structs
[
5
]
for
i
in
range
(
5
):
for
i
in
range
(
5
):
my_structs
[
i
].
i
=
i
my_structs
[
i
].
i
=
i
cdef
MyStruct
value
cdef
MyStruct
value
cdef
MyStruct
*
ptr
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
]
])
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