Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
56dab850
Commit
56dab850
authored
Jun 06, 2006
by
Thomas Heller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Specify argtypes for all test functions. Maybe that helps on strange ;-) architectures
parent
215f13dd
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
924 additions
and
108 deletions
+924
-108
Doc/lib/lib.tex
Doc/lib/lib.tex
+0
-1
Doc/lib/libctypes.tex
Doc/lib/libctypes.tex
+916
-107
Lib/ctypes/test/test_cfuncs.py
Lib/ctypes/test/test_cfuncs.py
+8
-0
No files found.
Doc/lib/lib.tex
View file @
56dab850
...
...
@@ -245,7 +245,6 @@ and how to embed it in other applications.
\input
{
libplatform
}
\input
{
liberrno
}
\input
{
libctypes
}
\input
{
libctypesref
}
\input
{
libsomeos
}
% Optional Operating System Services
\input
{
libselect
}
...
...
Doc/lib/libctypes.tex
View file @
56dab850
This diff is collapsed.
Click to expand it.
Lib/ctypes/test/test_cfuncs.py
View file @
56dab850
...
...
@@ -40,41 +40,49 @@ class CFunctions(unittest.TestCase):
def
test_short
(
self
):
self
.
_dll
.
tf_h
.
restype
=
c_short
self
.
_dll
.
tf_h
.
argtypes
=
(
c_short
,)
self
.
failUnlessEqual
(
self
.
_dll
.
tf_h
(
-
32766
),
-
10922
)
self
.
failUnlessEqual
(
self
.
S
(),
-
32766
)
def
test_short_plus
(
self
):
self
.
_dll
.
tf_bh
.
restype
=
c_short
self
.
_dll
.
tf_bh
.
argtypes
=
(
c_byte
,
c_short
)
self
.
failUnlessEqual
(
self
.
_dll
.
tf_bh
(
0
,
-
32766
),
-
10922
)
self
.
failUnlessEqual
(
self
.
S
(),
-
32766
)
def
test_ushort
(
self
):
self
.
_dll
.
tf_H
.
restype
=
c_ushort
self
.
_dll
.
tf_H
.
argtypes
=
(
c_ushort
,)
self
.
failUnlessEqual
(
self
.
_dll
.
tf_H
(
65535
),
21845
)
self
.
failUnlessEqual
(
self
.
U
(),
65535
)
def
test_ushort_plus
(
self
):
self
.
_dll
.
tf_bH
.
restype
=
c_ushort
self
.
_dll
.
tf_bH
.
argtypes
=
(
c_byte
,
c_ushort
)
self
.
failUnlessEqual
(
self
.
_dll
.
tf_bH
(
0
,
65535
),
21845
)
self
.
failUnlessEqual
(
self
.
U
(),
65535
)
def
test_int
(
self
):
self
.
_dll
.
tf_i
.
restype
=
c_int
self
.
_dll
.
tf_i
.
argtypes
=
(
c_int
,)
self
.
failUnlessEqual
(
self
.
_dll
.
tf_i
(
-
2147483646
),
-
715827882
)
self
.
failUnlessEqual
(
self
.
S
(),
-
2147483646
)
def
test_int_plus
(
self
):
self
.
_dll
.
tf_bi
.
restype
=
c_int
self
.
_dll
.
tf_bi
.
argtypes
=
(
c_byte
,
c_int
)
self
.
failUnlessEqual
(
self
.
_dll
.
tf_bi
(
0
,
-
2147483646
),
-
715827882
)
self
.
failUnlessEqual
(
self
.
S
(),
-
2147483646
)
def
test_uint
(
self
):
self
.
_dll
.
tf_I
.
restype
=
c_uint
self
.
_dll
.
tf_I
.
argtypes
=
(
c_uint
,)
self
.
failUnlessEqual
(
self
.
_dll
.
tf_I
(
4294967295
),
1431655765
)
self
.
failUnlessEqual
(
self
.
U
(),
4294967295
)
def
test_uint_plus
(
self
):
self
.
_dll
.
tf_bI
.
restype
=
c_uint
self
.
_dll
.
tf_bI
.
argtypes
=
(
c_byte
,
c_uint
)
self
.
failUnlessEqual
(
self
.
_dll
.
tf_bI
(
0
,
4294967295
),
1431655765
)
self
.
failUnlessEqual
(
self
.
U
(),
4294967295
)
...
...
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