[pypy-svn] r78045 - pypy/trunk/pypy/module/test_lib_pypy/ctypes_tests
arigo at codespeak.net
arigo at codespeak.net
Mon Oct 18 16:20:35 CEST 2010
Author: arigo
Date: Mon Oct 18 16:20:33 2010
New Revision: 78045
Modified:
pypy/trunk/pypy/module/test_lib_pypy/ctypes_tests/_ctypes_test.c
pypy/trunk/pypy/module/test_lib_pypy/ctypes_tests/test_funcptr.py
Log:
A test for a property of ctypes: default restype.
Modified: pypy/trunk/pypy/module/test_lib_pypy/ctypes_tests/_ctypes_test.c
==============================================================================
--- pypy/trunk/pypy/module/test_lib_pypy/ctypes_tests/_ctypes_test.c (original)
+++ pypy/trunk/pypy/module/test_lib_pypy/ctypes_tests/_ctypes_test.c Mon Oct 18 16:20:33 2010
@@ -533,3 +533,7 @@
return inp;
}
+int my_unused_function(void)
+{
+ return 42;
+}
Modified: pypy/trunk/pypy/module/test_lib_pypy/ctypes_tests/test_funcptr.py
==============================================================================
--- pypy/trunk/pypy/module/test_lib_pypy/ctypes_tests/test_funcptr.py (original)
+++ pypy/trunk/pypy/module/test_lib_pypy/ctypes_tests/test_funcptr.py Mon Oct 18 16:20:33 2010
@@ -148,3 +148,7 @@
# but it segfaults for some reason.
if sys.platform == 'win32':
assert f() == 0x12345678
+
+ def test_restype(self):
+ foo = lib.my_unused_function
+ assert foo.restype is c_int # by default
More information about the Pypy-commit
mailing list