[pypy-commit] cffi default: An extra test
arigo
noreply at buildbot.pypy.org
Sat Nov 30 21:53:50 CET 2013
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r1435:de7e8aec4001
Date: 2013-11-30 21:53 +0100
http://bitbucket.org/cffi/cffi/changeset/de7e8aec4001/
Log: An extra test
diff --git a/c/test_c.py b/c/test_c.py
--- a/c/test_c.py
+++ b/c/test_c.py
@@ -3136,6 +3136,12 @@
py.test.raises(TypeError, "p + cast(new_primitive_type('int'), 42)")
py.test.raises(TypeError, "p - cast(new_primitive_type('int'), 42)")
+def test_sizeof_sliced_array():
+ BInt = new_primitive_type("int")
+ BArray = new_array_type(new_pointer_type(BInt), 10)
+ p = newp(BArray, None)
+ assert sizeof(p[2:9]) == 7 * sizeof(BInt)
+
def test_version():
# this test is here mostly for PyPy
More information about the pypy-commit
mailing list