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
3fe3c573
Commit
3fe3c573
authored
Oct 27, 2008
by
Lisandro Dalcin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more tests for get/del integer keys in dicts
parent
13dff283
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
tests/run/dictintindex.pyx
tests/run/dictintindex.pyx
+38
-0
No files found.
tests/run/dictintindex.pyx
View file @
3fe3c573
...
...
@@ -25,10 +25,14 @@ __doc__ = u"""
1
>>> test_get_longlong_pos()
2
>>> test_get_longlong_big()
3
>>> test_get_ulonglong_zero()
1
>>> test_get_ulonglong_pos()
2
>>> test_get_ulonglong_big()
3
>>> test_del_char()
Traceback (most recent call last):
KeyError: 0
...
...
@@ -44,9 +48,15 @@ KeyError: 0
>>> test_del_longlong() #doctest: +ELLIPSIS
Traceback (most recent call last):
KeyError: 0...
>>> test_del_longlong_big() #doctest: +ELLIPSIS
Traceback (most recent call last):
KeyError: ...
>>> test_del_ulonglong() #doctest: +ELLIPSIS
Traceback (most recent call last):
KeyError: 0...
>>> test_del_ulonglong_big() #doctest: +ELLIPSIS
Traceback (most recent call last):
KeyError: ...
"""
def
test_get_char_neg
():
...
...
@@ -109,6 +119,12 @@ def test_get_longlong_pos():
cdef
long
long
key
=
1
d
=
{
1
:
2
}
return
d
[
key
]
def
test_get_longlong_big
():
cdef
unsigned
int
shift
=
sizeof
(
long
)
+
2
cdef
long
long
big
=
1
cdef
long
long
key
=
big
<<
shift
d
=
{
big
<<
shift
:
3
}
return
d
[
key
]
def
test_get_ulonglong_zero
():
cdef
unsigned
long
long
key
=
0
...
...
@@ -118,6 +134,12 @@ def test_get_ulonglong_pos():
cdef
unsigned
long
long
key
=
1
d
=
{
1
:
2
}
return
d
[
key
]
def
test_get_ulonglong_big
():
cdef
unsigned
int
shift
=
sizeof
(
long
)
+
2
cdef
unsigned
long
long
big
=
1
cdef
unsigned
long
long
key
=
big
<<
shift
d
=
{
big
<<
shift
:
3
}
return
d
[
key
]
def
test_del_char
():
...
...
@@ -155,3 +177,19 @@ def test_del_ulonglong():
d
=
{
0
:
1
}
del
d
[
key
]
return
d
[
key
]
def
test_del_longlong_big
():
cdef
int
shift
=
sizeof
(
long
)
+
2
cdef
long
long
big
=
1
cdef
long
long
key
=
big
<<
shift
d
=
{
big
<<
shift
:
1
}
del
d
[
key
]
return
d
[
key
]
def
test_del_ulonglong_big
():
cdef
unsigned
int
shift
=
sizeof
(
long
)
+
2
cdef
unsigned
long
long
big
=
1
cdef
unsigned
long
long
key
=
big
<<
shift
d
=
{
big
<<
shift
:
1
}
del
d
[
key
]
return
d
[
key
]
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