Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
PyPy
cffi
Commits
a969ece955c7
Commit
cea8f126
authored
Dec 21, 2020
by
Armin Rigo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add some more tests
parent
66c5dea25467
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
c/test_c.py
c/test_c.py
+5
-0
No files found.
c/test_c.py
View file @
a969ece9
...
...
@@ -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"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment