[pypy-commit] cffi default: Add a test
arigo
noreply at buildbot.pypy.org
Tue Jul 10 13:21:57 CEST 2012
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r621:8ac558826f7c
Date: 2012-07-10 13:18 +0200
http://bitbucket.org/cffi/cffi/changeset/8ac558826f7c/
Log: Add a test
diff --git a/c/test_c.py b/c/test_c.py
--- a/c/test_c.py
+++ b/c/test_c.py
@@ -1445,6 +1445,11 @@
p = newp(BArray, 7)
assert repr(p) == "<cdata 'int[]' owning 28 bytes>"
assert sizeof(p) == 28
+ #
+ BArray = new_array_type(new_pointer_type(BInt), 7) # int[7]
+ p = newp(BArray, None)
+ assert repr(p) == "<cdata 'int[7]' owning 28 bytes>"
+ assert sizeof(p) == 28
def test_cannot_dereference_void():
BVoidP = new_pointer_type(new_void_type())
More information about the pypy-commit
mailing list