Author: Armin Rigo <[email protected]>
Branch:
Changeset: r585:614d1fdd77d3
Date: 2012-07-07 12:26 +0200
http://bitbucket.org/cffi/cffi/changeset/614d1fdd77d3/
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
@@ -1303,3 +1303,9 @@
pp[0] = p
s = pp[0][0]
assert repr(s).startswith("<cdata 'struct foo' 0x")
+
+def test_owning_repr():
+ BInt = new_primitive_type("int")
+ BArray = new_array_type(new_pointer_type(BInt), None) # int[]
+ p = newp(BArray, 7)
+ assert repr(p) == "<cdata 'int[]' owning 28 bytes>"
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit