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
cad68bb9
Commit
cad68bb9
authored
Oct 29, 2009
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
extended/fixed test case
parent
54cd7130
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
tests/run/int_float_builtins_as_casts_T400.pyx
tests/run/int_float_builtins_as_casts_T400.pyx
+14
-2
No files found.
tests/run/int_float_builtins_as_casts_T400.pyx
View file @
cad68bb9
...
@@ -25,13 +25,25 @@ def double_to_pyssizet_int(double x):
...
@@ -25,13 +25,25 @@ def double_to_pyssizet_int(double x):
cdef
Py_ssize_t
r
=
int
(
x
)
cdef
Py_ssize_t
r
=
int
(
x
)
return
r
return
r
@
cython
.
test_assert_path_exists
(
"//SingleAssignmentNode/CastNode"
)
@
cython
.
test_fail_if_path_exists
(
"//SimpleCallNode"
)
def
int_to_pyssizet_int
(
int
x
):
"""
>>> int_to_pyssizet_int(4.1)
4
>>> int_to_pyssizet_int(4)
4
"""
cdef
Py_ssize_t
r
=
int
(
x
)
return
r
@
cython
.
test_assert_path_exists
(
"//SingleAssignmentNode/CastNode"
)
@
cython
.
test_assert_path_exists
(
"//SingleAssignmentNode/CastNode"
)
@
cython
.
test_fail_if_path_exists
(
"//SimpleCallNode"
)
@
cython
.
test_fail_if_path_exists
(
"//SimpleCallNode"
)
def
double_to_pyssizet_float
(
double
x
):
def
double_to_pyssizet_float
(
double
x
):
"""
"""
>>> double_to_pyssizet_
in
t(4.1)
>>> double_to_pyssizet_
floa
t(4.1)
4
4
>>> double_to_pyssizet_
in
t(4)
>>> double_to_pyssizet_
floa
t(4)
4
4
"""
"""
cdef
Py_ssize_t
r
=
float
(
x
)
cdef
Py_ssize_t
r
=
float
(
x
)
...
...
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