[pypy-commit] cffi default: Add test

arigo noreply at buildbot.pypy.org
Sat Jul 7 14:35:03 CEST 2012


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r591:8a351c2b7342
Date: 2012-07-07 14:34 +0200
http://bitbucket.org/cffi/cffi/changeset/8a351c2b7342/

Log:	Add test

diff --git a/c/test_c.py b/c/test_c.py
--- a/c/test_c.py
+++ b/c/test_c.py
@@ -1377,3 +1377,8 @@
         # XXX pypy doesn't support the following assignment so far
         buf[:4:2] = 'XY'
         assert str(c) == 'XIYthere'
+
+def test_getcname():
+    BUChar = new_primitive_type("unsigned char")
+    BArray = new_array_type(new_pointer_type(BUChar), 123)
+    assert getcname(BArray, "<-->") == "unsigned char<-->[123]"


More information about the pypy-commit mailing list