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
36f75320
Commit
36f75320
authored
Jan 24, 2010
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix test after fixing #480
parent
2520038e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
tests/run/int_float_builtins_as_casts_T400.pyx
tests/run/int_float_builtins_as_casts_T400.pyx
+11
-11
No files found.
tests/run/int_float_builtins_as_casts_T400.pyx
View file @
36f75320
cimport
cython
@
cython
.
test_assert_path_exists
(
"//SingleAssignmentNode/
C
astNode"
)
@
cython
.
test_assert_path_exists
(
"//SingleAssignmentNode/
Typec
astNode"
)
@
cython
.
test_fail_if_path_exists
(
"//SimpleCallNode"
)
def
double_to_short_int
(
double
x
):
"""
...
...
@@ -13,7 +13,7 @@ def double_to_short_int(double x):
cdef
short
r
=
int
(
x
)
return
r
@
cython
.
test_assert_path_exists
(
"//SingleAssignmentNode/
C
astNode"
)
@
cython
.
test_assert_path_exists
(
"//SingleAssignmentNode/
Typec
astNode"
)
@
cython
.
test_fail_if_path_exists
(
"//SimpleCallNode"
)
def
double_to_pyssizet_int
(
double
x
):
"""
...
...
@@ -25,7 +25,7 @@ def double_to_pyssizet_int(double x):
cdef
Py_ssize_t
r
=
int
(
x
)
return
r
@
cython
.
test_assert_path_exists
(
"//SingleAssignmentNode/
C
astNode"
)
@
cython
.
test_assert_path_exists
(
"//SingleAssignmentNode/
Typec
astNode"
)
@
cython
.
test_fail_if_path_exists
(
"//SimpleCallNode"
)
def
int_to_pyssizet_int
(
int
x
):
"""
...
...
@@ -37,7 +37,7 @@ def int_to_pyssizet_int(int x):
cdef
Py_ssize_t
r
=
int
(
x
)
return
r
## @cython.test_assert_path_exists("//SingleAssignmentNode/
C
astNode")
## @cython.test_assert_path_exists("//SingleAssignmentNode/
Typec
astNode")
## @cython.test_fail_if_path_exists("//SimpleCallNode")
## def double_to_pyssizet_float(double x):
## """
...
...
@@ -49,7 +49,7 @@ def int_to_pyssizet_int(int x):
## cdef Py_ssize_t r = float(x)
## return r
@
cython
.
test_assert_path_exists
(
"//SingleAssignmentNode/
C
astNode"
)
@
cython
.
test_assert_path_exists
(
"//SingleAssignmentNode/
Typec
astNode"
)
@
cython
.
test_fail_if_path_exists
(
"//SimpleCallNode"
)
def
int_to_short_int
(
int
x
):
"""
...
...
@@ -59,7 +59,7 @@ def int_to_short_int(int x):
cdef
short
r
=
int
(
x
)
return
r
@
cython
.
test_assert_path_exists
(
"//SingleAssignmentNode/
C
astNode"
)
@
cython
.
test_assert_path_exists
(
"//SingleAssignmentNode/
Typec
astNode"
)
@
cython
.
test_fail_if_path_exists
(
"//SimpleCallNode"
)
def
short_to_float_float
(
short
x
):
"""
...
...
@@ -69,7 +69,7 @@ def short_to_float_float(short x):
cdef
float
r
=
float
(
x
)
return
r
@
cython
.
test_assert_path_exists
(
"//SingleAssignmentNode/
C
astNode"
)
@
cython
.
test_assert_path_exists
(
"//SingleAssignmentNode/
Typec
astNode"
)
@
cython
.
test_fail_if_path_exists
(
"//SimpleCallNode"
)
def
short_to_double_float
(
short
x
):
"""
...
...
@@ -79,7 +79,7 @@ def short_to_double_float(short x):
cdef
double
r
=
float
(
x
)
return
r
@
cython
.
test_assert_path_exists
(
"//SingleAssignmentNode/
C
astNode"
)
@
cython
.
test_assert_path_exists
(
"//SingleAssignmentNode/
Typec
astNode"
)
@
cython
.
test_fail_if_path_exists
(
"//SimpleCallNode"
)
def
short_to_double_int
(
short
x
):
"""
...
...
@@ -101,7 +101,7 @@ def float_to_float_float(float x):
return
r
@
cython
.
test_fail_if_path_exists
(
"//SimpleCallNode"
,
"//SingleAssignmentNode/
C
astNode"
)
"//SingleAssignmentNode/
Typec
astNode"
)
def
double_to_double_float
(
double
x
):
"""
>>> 4.05 < double_to_double_float(4.1) < 4.15
...
...
@@ -114,7 +114,7 @@ def double_to_double_float(double x):
# tests that cannot be optimised
@
cython
.
test_fail_if_path_exists
(
"//SingleAssignmentNode/
C
astNode"
)
@
cython
.
test_fail_if_path_exists
(
"//SingleAssignmentNode/
Typec
astNode"
)
@
cython
.
test_assert_path_exists
(
"//SimpleCallNode"
)
def
double_to_py_int
(
double
x
):
"""
...
...
@@ -125,7 +125,7 @@ def double_to_py_int(double x):
"""
return
int
(
x
)
@
cython
.
test_fail_if_path_exists
(
"//SingleAssignmentNode/
C
astNode"
)
@
cython
.
test_fail_if_path_exists
(
"//SingleAssignmentNode/
Typec
astNode"
)
@
cython
.
test_assert_path_exists
(
"//SimpleCallNode"
)
def
double_to_double_int
(
double
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