[pypy-commit] cffi default: A passing test.
arigo
noreply at buildbot.pypy.org
Sat Jun 16 11:35:20 CEST 2012
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r391:3feebda7fef7
Date: 2012-06-16 11:33 +0200
http://bitbucket.org/cffi/cffi/changeset/3feebda7fef7/
Log: A passing test.
diff --git a/testing/test_function.py b/testing/test_function.py
--- a/testing/test_function.py
+++ b/testing/test_function.py
@@ -53,6 +53,19 @@
assert x != math.sin(1.23) # rounding effects
assert abs(x - math.sin(1.23)) < 1E-6
+ def test_tlsalloc(self):
+ if sys.platform != 'win32':
+ py.test.skip("win32 only")
+ if self.Backend is CTypesBackend:
+ py.test.skip("ctypes complains on wrong calling conv")
+ ffi = FFI(backend=self.Backend())
+ ffi.cdef("long TlsAlloc(void); int TlsFree(long);")
+ lib = ffi.dlopen('KERNEL32')
+ x = lib.TlsAlloc()
+ assert x != 0
+ y = lib.TlsFree(x)
+ assert y != 0
+
def test_puts(self):
ffi = FFI(backend=self.Backend())
ffi.cdef("""
More information about the pypy-commit
mailing list