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
03fd0774
Kaydet (Commit)
03fd0774
authored
Kas 02, 2007
tarafından
Thomas Heller
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Enable the full ctypes c_longdouble tests again.
üst
486b1b02
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
22 deletions
+22
-22
test_cfuncs.py
Lib/ctypes/test/test_cfuncs.py
+11
-11
test_functions.py
Lib/ctypes/test/test_functions.py
+11
-11
No files found.
Lib/ctypes/test/test_cfuncs.py
Dosyayı görüntüle @
03fd0774
...
...
@@ -158,17 +158,17 @@ class CFunctions(unittest.TestCase):
self
.
failUnlessEqual
(
self
.
_dll
.
tf_bd
(
0
,
42.
),
14.
)
self
.
failUnlessEqual
(
self
.
S
(),
42
)
##
def test_longdouble(self):
##
self._dll.tf_D.restype = c_longdouble
##
self._dll.tf_D.argtypes = (c_longdouble,)
##
self.failUnlessEqual(self._dll.tf_D(42.), 14.)
##
self.failUnlessEqual(self.S(), 42)
##
def test_longdouble_plus(self):
##
self._dll.tf_bD.restype = c_longdouble
##
self._dll.tf_bD.argtypes = (c_byte, c_longdouble)
##
self.failUnlessEqual(self._dll.tf_bD(0, 42.), 14.)
##
self.failUnlessEqual(self.S(), 42)
def
test_longdouble
(
self
):
self
.
_dll
.
tf_D
.
restype
=
c_longdouble
self
.
_dll
.
tf_D
.
argtypes
=
(
c_longdouble
,)
self
.
failUnlessEqual
(
self
.
_dll
.
tf_D
(
42.
),
14.
)
self
.
failUnlessEqual
(
self
.
S
(),
42
)
def
test_longdouble_plus
(
self
):
self
.
_dll
.
tf_bD
.
restype
=
c_longdouble
self
.
_dll
.
tf_bD
.
argtypes
=
(
c_byte
,
c_longdouble
)
self
.
failUnlessEqual
(
self
.
_dll
.
tf_bD
(
0
,
42.
),
14.
)
self
.
failUnlessEqual
(
self
.
S
(),
42
)
def
test_callwithresult
(
self
):
def
process_result
(
result
):
...
...
Lib/ctypes/test/test_functions.py
Dosyayı görüntüle @
03fd0774
...
...
@@ -143,17 +143,17 @@ class FunctionTestCase(unittest.TestCase):
self
.
failUnlessEqual
(
result
,
-
21
)
self
.
failUnlessEqual
(
type
(
result
),
float
)
##
def test_longdoubleresult(self):
##
f = dll._testfunc_D_bhilfD
##
f.argtypes = [c_byte, c_short, c_int, c_long, c_float, c_longdouble]
##
f.restype = c_longdouble
##
result = f(1, 2, 3, 4, 5.0, 6.0)
##
self.failUnlessEqual(result, 21)
##
self.failUnlessEqual(type(result), float)
##
result = f(-1, -2, -3, -4, -5.0, -6.0)
##
self.failUnlessEqual(result, -21)
##
self.failUnlessEqual(type(result), float)
def
test_longdoubleresult
(
self
):
f
=
dll
.
_testfunc_D_bhilfD
f
.
argtypes
=
[
c_byte
,
c_short
,
c_int
,
c_long
,
c_float
,
c_longdouble
]
f
.
restype
=
c_longdouble
result
=
f
(
1
,
2
,
3
,
4
,
5.0
,
6.0
)
self
.
failUnlessEqual
(
result
,
21
)
self
.
failUnlessEqual
(
type
(
result
),
float
)
result
=
f
(
-
1
,
-
2
,
-
3
,
-
4
,
-
5.0
,
-
6.0
)
self
.
failUnlessEqual
(
result
,
-
21
)
self
.
failUnlessEqual
(
type
(
result
),
float
)
def
test_longlongresult
(
self
):
try
:
...
...
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