Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
56dab850
Kaydet (Commit)
56dab850
authored
Haz 06, 2006
tarafından
Thomas Heller
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Specify argtypes for all test functions. Maybe that helps on strange ;-) architectures
üst
215f13dd
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
1 deletion
+8
-1
lib.tex
Doc/lib/lib.tex
+0
-1
libctypes.tex
Doc/lib/libctypes.tex
+0
-0
test_cfuncs.py
Lib/ctypes/test/test_cfuncs.py
+8
-0
No files found.
Doc/lib/lib.tex
Dosyayı görüntüle @
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
Dosyayı görüntüle @
56dab850
This diff is collapsed.
Click to expand it.
Lib/ctypes/test/test_cfuncs.py
Dosyayı görüntüle @
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