Author: Armin Rigo <[email protected]>
Branch:
Changeset: r1605:a075a6d57e9e
Date: 2014-12-28 06:22 +0100
http://bitbucket.org/cffi/cffi/changeset/a075a6d57e9e/
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
@@ -3214,6 +3214,7 @@
BCharA = new_array_type(BCharP, None)
c = from_buffer(BCharA, a)
assert typeof(c) is BCharA
+ assert len(c) == 6
assert repr(c) == "<cdata 'char[]' buffer len 6 from 'array.array' object>"
p = new_pointer_type(new_primitive_type("unsigned short"))
cast(p, c)[1] += 500
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit