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
Kirill Smelkov
cython
Commits
c709da7c
Commit
c709da7c
authored
Apr 26, 2011
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Py3 test fix
parent
6be512ce
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
tests/run/arithmetic_analyse_types.pyx
tests/run/arithmetic_analyse_types.pyx
+12
-12
No files found.
tests/run/arithmetic_analyse_types.pyx
View file @
c709da7c
...
@@ -18,40 +18,40 @@ def short_binop(short val):
...
@@ -18,40 +18,40 @@ def short_binop(short val):
"""
"""
Arithmetic in C is always done with at least int precision.
Arithmetic in C is always done with at least int precision.
>>>
short_binop(3
)
>>>
print(short_binop(3)
)
'int called'
int called
"""
"""
assert
typeof
(
val
+
val
)
==
"int"
,
typeof
(
val
+
val
)
assert
typeof
(
val
+
val
)
==
"int"
,
typeof
(
val
+
val
)
assert
typeof
(
val
-
val
)
==
"int"
,
typeof
(
val
-
val
)
assert
typeof
(
val
-
val
)
==
"int"
,
typeof
(
val
-
val
)
assert
typeof
(
val
&
val
)
==
"int"
,
typeof
(
val
&
val
)
assert
typeof
(
val
&
val
)
==
"int"
,
typeof
(
val
&
val
)
cdef
int_return
x
=
f
(
val
+
val
)
cdef
int_return
x
=
f
(
val
+
val
)
return
x
.
msg
return
x
.
msg
.
decode
(
'ASCII'
)
def
short_unnop
(
short
val
):
def
short_unnop
(
short
val
):
"""
"""
Arithmetic in C is always done with at least int precision.
Arithmetic in C is always done with at least int precision.
>>>
short_unnop(3
)
>>>
print(short_unnop(3)
)
'int called'
int called
"""
"""
cdef
int_return
x
=
f
(
-
val
)
cdef
int_return
x
=
f
(
-
val
)
return
x
.
msg
return
x
.
msg
.
decode
(
'ASCII'
)
def
longlong_binop
(
long
long
val
):
def
longlong_binop
(
long
long
val
):
"""
"""
>>>
longlong_binop(3
)
>>>
print(longlong_binop(3)
)
'long long called'
long long called
"""
"""
cdef
longlong_return
x
=
f
(
val
*
val
)
cdef
longlong_return
x
=
f
(
val
*
val
)
return
x
.
msg
return
x
.
msg
.
decode
(
'ASCII'
)
def
longlong_unnop
(
long
long
val
):
def
longlong_unnop
(
long
long
val
):
"""
"""
>>>
longlong_unnop(3
)
>>>
print(longlong_unnop(3)
)
'long long called'
long long called
"""
"""
cdef
longlong_return
x
=
f
(
~
val
)
cdef
longlong_return
x
=
f
(
~
val
)
return
x
.
msg
return
x
.
msg
.
decode
(
'ASCII'
)
def
test_bint
(
bint
a
):
def
test_bint
(
bint
a
):
...
...
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