Author: Armin Rigo <[email protected]>
Branch:
Changeset: r2372:86cdfb3ff7fa
Date: 2015-11-03 20:58 +0100
http://bitbucket.org/cffi/cffi/changeset/86cdfb3ff7fa/
Log: Add a direct test for _get_common_types()
diff --git a/c/test_c.py b/c/test_c.py
--- a/c/test_c.py
+++ b/c/test_c.py
@@ -7,7 +7,7 @@
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
_setup_path()
from _cffi_backend import *
-from _cffi_backend import _testfunc, _get_types, __version__
+from _cffi_backend import _testfunc, _get_types, _get_common_types, __version__
# ____________________________________________________________
@@ -3520,3 +3520,8 @@
assert repr(BFunc) == "<ctype 'int(__stdcall *)(int, int)'>"
else:
assert repr(BFunc) == "<ctype 'int(*)(int, int)'>"
+
+def test_get_common_types():
+ d = {}
+ _get_common_types(d)
+ assert d['bool'] == '_Bool'
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit