[pypy-commit] cffi default: Add a passing Windows test
arigo
noreply at buildbot.pypy.org
Sun Jun 29 11:06:11 CEST 2014
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r1531:ab49d344cfe2
Date: 2014-06-29 11:06 +0200
http://bitbucket.org/cffi/cffi/changeset/ab49d344cfe2/
Log: Add a passing Windows test
diff --git a/testing/test_function.py b/testing/test_function.py
--- a/testing/test_function.py
+++ b/testing/test_function.py
@@ -402,3 +402,18 @@
if wr() is not None:
import gc; gc.collect()
assert wr() is None # 'data' does not leak
+
+ def test_windows_stdcall(self):
+ if sys.platform != 'win32':
+ py.test.skip("Windows-only test")
+ if self.Backend is CTypesBackend:
+ py.test.skip("not with the ctypes backend")
+ ffi = FFI(backend=self.Backend())
+ ffi.cdef("""
+ BOOL QueryPerformanceFrequency(LONGLONG *lpFrequency);
+ """)
+ m = ffi.dlopen("Kernel32.dll")
+ p_freq = ffi.new("LONGLONG *")
+ res = m.QueryPerformanceFrequency(p_freq)
+ assert res != 0
+ assert p_freq[0] != 0
More information about the pypy-commit
mailing list