Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r1060:63bf01f22e80 Date: 2012-11-23 14:00 +0100 http://bitbucket.org/cffi/cffi/changeset/63bf01f22e80/
Log: Add a test, failing on pypy diff --git a/c/test_c.py b/c/test_c.py --- a/c/test_c.py +++ b/c/test_c.py @@ -2508,3 +2508,8 @@ 'uint32_t', 'int64_t', 'uint64_t', 'intptr_t', 'uintptr_t', 'ptrdiff_t', 'size_t', 'ssize_t']: new_primitive_type(typename) # works + +def test_cannot_convert_unicode_to_charp(): + BCharP = new_pointer_type(new_primitive_type("char")) + BCharArray = new_array_type(BCharP, None) + py.test.raises(TypeError, newp, BCharArray, u+'foobar') _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit