[pypy-commit] cffi default: Add test
arigo
noreply at buildbot.pypy.org
Sat Jul 7 17:48:31 CEST 2012
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r592:e156a7aecc87
Date: 2012-07-07 17:48 +0200
http://bitbucket.org/cffi/cffi/changeset/e156a7aecc87/
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
@@ -1358,6 +1358,12 @@
assert (p < s) ^ (p > s)
def test_buffer():
+ BShort = new_primitive_type("short")
+ s = newp(new_pointer_type(BShort), 100)
+ assert sizeof(s) == size_of_ptr()
+ assert sizeof(BShort) == 2
+ assert len(str(buffer(s))) == 2
+ #
BChar = new_primitive_type("char")
BCharArray = new_array_type(new_pointer_type(BChar), None)
c = newp(BCharArray, "hi there")
More information about the pypy-commit
mailing list