Author: Armin Rigo <ar...@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 _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit