Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
nexedi
cython
Commits
2651a5d4
Commit
2651a5d4
authored
Feb 18, 2011
by
Lisandro Dalcin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix testcases assuming char is signed (thanks to Yaroslav Halchenko)
parent
e1261521
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
c_int_types_T255.pyx
tests/run/c_int_types_T255.pyx
+2
-2
dictintindex.pyx
tests/run/dictintindex.pyx
+4
-1
No files found.
tests/run/c_int_types_T255.pyx
View file @
2651a5d4
...
...
@@ -93,10 +93,10 @@ def test_char(char x):
Traceback (most recent call last):
...
OverflowError: ...
>>> if CHAR_MIN < 0:
... assert test_char(-1) == -1
>>> test_char(CHAR_MIN) == CHAR_MIN
True
>>> test_char(-1)
-1
>>> test_char(0)
0
>>> test_char(1)
...
...
tests/run/dictintindex.pyx
View file @
2651a5d4
...
...
@@ -4,7 +4,10 @@ def test_get_char_neg():
0
"""
cdef char key = -1
if <char>-1 < 0:
d = {-1:0}
else:
d = {255:0}
return d[key]
def test_get_char_zero():
"""
...
...
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