[pypy-svn] r54474 - pypy/dist/pypy/lib/app_test/ctypes_tests
arigo at codespeak.net
arigo at codespeak.net
Tue May 6 14:21:44 CEST 2008
Author: arigo
Date: Tue May 6 14:21:43 2008
New Revision: 54474
Modified:
pypy/dist/pypy/lib/app_test/ctypes_tests/test_extra.py
Log:
Test for r54473.
Modified: pypy/dist/pypy/lib/app_test/ctypes_tests/test_extra.py
==============================================================================
--- pypy/dist/pypy/lib/app_test/ctypes_tests/test_extra.py (original)
+++ pypy/dist/pypy/lib/app_test/ctypes_tests/test_extra.py Tue May 6 14:21:43 2008
@@ -228,3 +228,13 @@
def test_from_param(self):
# other working cases of from_param
assert isinstance(c_void_p.from_param((c_int * 4)()), c_int*4)
+
+ def test_cast_none(self):
+ def check(P):
+ x = cast(None, P)
+ assert isinstance(x, P)
+ assert not x
+ check(c_void_p)
+ check(c_char_p)
+ check(POINTER(c_int))
+ check(POINTER(c_int * 10))
More information about the Pypy-commit
mailing list