Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
PyPy
cffi
Commits
0f549bccae62
Commit
999ecdd9
authored
Jul 03, 2015
by
Armin Rigo
Browse files
Write a test for issue
#212
parent
af1fb2b8ce3b
Changes
1
Hide whitespace changes
Inline
Side-by-side
testing/cffi1/test_verify1.py
View file @
0f549bcc
...
...
@@ -2230,3 +2230,15 @@ def test_unsupported_some_primitive_types():
#
ffi
.
cdef
(
"typedef int... foo_t;"
)
py
.
test
.
raises
(
VerificationError
,
ffi
.
verify
,
"typedef float foo_t;"
)
def
test_windows_dllimport_data
():
if
sys
.
platform
!=
'win32'
:
py
.
test
.
skip
(
"Windows only"
)
from
testing.udir
import
udir
tmpfile
=
udir
.
join
(
'dllimport_data.c'
)
tmpfile
.
write
(
'int my_value = 42;
\n
'
)
ffi
=
FFI
()
ffi
.
cdef
(
"int my_value;"
)
lib
=
ffi
.
verify
(
"extern __declspec(dllimport) int my_value;"
,
sources
=
[
str
(
tmpfile
)])
assert
lib
.
my_value
==
42
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