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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
3218a24e
Commit
3218a24e
authored
Aug 11, 2012
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix try-finally usage in STL vector test
parent
2812f9b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
tests/run/cpp_stl_vector.pyx
tests/run/cpp_stl_vector.pyx
+6
-6
No files found.
tests/run/cpp_stl_vector.pyx
View file @
3218a24e
...
@@ -10,8 +10,8 @@ def simple_test(double x):
...
@@ -10,8 +10,8 @@ def simple_test(double x):
>>> simple_test(55)
>>> simple_test(55)
3
3
"""
"""
v
=
new
vector
[
double
]()
try
:
try
:
v
=
new
vector
[
double
]()
v
.
push_back
(
1.0
)
v
.
push_back
(
1.0
)
v
.
push_back
(
x
)
v
.
push_back
(
x
)
from
math
import
pi
from
math
import
pi
...
@@ -29,8 +29,8 @@ def list_test(L):
...
@@ -29,8 +29,8 @@ def list_test(L):
>>> list_test([-1] * 1000)
>>> list_test([-1] * 1000)
(1000, 1000)
(1000, 1000)
"""
"""
v
=
new
vector
[
int
]()
try
:
try
:
v
=
new
vector
[
int
]()
for
a
in
L
:
for
a
in
L
:
v
.
push_back
(
a
)
v
.
push_back
(
a
)
return
len
(
L
),
v
.
size
()
return
len
(
L
),
v
.
size
()
...
@@ -44,8 +44,8 @@ def index_test(L):
...
@@ -44,8 +44,8 @@ def index_test(L):
>>> index_test([1.25])
>>> index_test([1.25])
(1.25, 1.25)
(1.25, 1.25)
"""
"""
v
=
new
vector
[
double
]()
try
:
try
:
v
=
new
vector
[
double
]()
for
a
in
L
:
for
a
in
L
:
v
.
push_back
(
a
)
v
.
push_back
(
a
)
return
v
[
0
][
0
],
v
[
0
][
len
(
L
)
-
1
]
return
v
[
0
][
0
],
v
[
0
][
len
(
L
)
-
1
]
...
@@ -60,8 +60,8 @@ def index_set_test(L):
...
@@ -60,8 +60,8 @@ def index_set_test(L):
>>> index_set_test([1.25])
>>> index_set_test([1.25])
(-1.25, -1.25)
(-1.25, -1.25)
"""
"""
v
=
new
vector
[
double
]()
try
:
try
:
v
=
new
vector
[
double
]()
for
a
in
L
:
for
a
in
L
:
v
.
push_back
(
a
)
v
.
push_back
(
a
)
for
i
in
range
(
v
.
size
()):
for
i
in
range
(
v
.
size
()):
...
@@ -78,8 +78,8 @@ def iteration_test(L):
...
@@ -78,8 +78,8 @@ def iteration_test(L):
4
4
8
8
"""
"""
v
=
new
vector
[
int
]()
try
:
try
:
v
=
new
vector
[
int
]()
for
a
in
L
:
for
a
in
L
:
v
.
push_back
(
a
)
v
.
push_back
(
a
)
it
=
v
.
begin
()
it
=
v
.
begin
()
...
@@ -98,8 +98,8 @@ def reverse_iteration_test(L):
...
@@ -98,8 +98,8 @@ def reverse_iteration_test(L):
2
2
1
1
"""
"""
v
=
new
vector
[
int
]()
try
:
try
:
v
=
new
vector
[
int
]()
for
a
in
L
:
for
a
in
L
:
v
.
push_back
(
a
)
v
.
push_back
(
a
)
it
=
v
.
rbegin
()
it
=
v
.
rbegin
()
...
...
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