diff options
author | Armin Rigo <arigo@tunes.org> | 2020-12-21 09:44:45 +0100 |
---|---|---|
committer | Armin Rigo <arigo@tunes.org> | 2020-12-21 09:44:45 +0100 |
commit | 96110e096277c59fc571b62fc5371a500ad82ed5 (patch) | |
tree | 274852a30b070ec8e099834d95fec28ba37fcb03 /c | |
parent | 7053b16654b881a846ee1b4e8f68dcd41b40fb90 (diff) | |
download | cffi-96110e096277c59fc571b62fc5371a500ad82ed5.tar.gz |
add some more tests
Diffstat (limited to 'c')
-rw-r--r-- | c/test_c.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/c/test_c.py b/c/test_c.py index 7880703..9c4ab4b 100644 --- a/c/test_c.py +++ b/c/test_c.py @@ -3981,7 +3981,12 @@ def test_issue483(): lst = list(range(25)) bytestring = bytearray(buffer(newp(BIntA, lst))[:] + b'XYZ') p1 = from_buffer(BIntA, bytestring) # int[] + assert len(buffer(p1)) == 25 * size_of_int() assert sizeof(p1) == 25 * size_of_int() + # + p2 = from_buffer(BIntP, bytestring) + assert sizeof(p2) == size_of_ptr() + assert len(buffer(p2)) == size_of_int() # first element only, by default def test_memmove(): Short = new_primitive_type("short") |