diff options
author | Armin Rigo <arigo@tunes.org> | 2012-08-12 10:54:42 +0200 |
---|---|---|
committer | Armin Rigo <arigo@tunes.org> | 2012-08-12 10:54:42 +0200 |
commit | 9349267137aaecf1ce86f1415e5c8d0439444068 (patch) | |
tree | 5d0f0cebb863b1aa79aaf0a9b8284b39d02ee5a8 /testing/test_function.py | |
parent | c7c340ed03b0ea66fc3356c2f9cd358382f944a0 (diff) | |
download | cffi-9349267137aaecf1ce86f1415e5c8d0439444068.tar.gz |
Add two tests, one passing and one (probably definitely) skipped.
Diffstat (limited to 'testing/test_function.py')
-rw-r--r-- | testing/test_function.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/testing/test_function.py b/testing/test_function.py index db2a421..8cc61d7 100644 --- a/testing/test_function.py +++ b/testing/test_function.py @@ -268,3 +268,14 @@ class TestFunction(object): ina = ffi.new("struct in_addr *", [0x04040404]) a = ffi.C.inet_ntoa(ina[0]) assert ffi.string(a) == '4.4.4.4' + + def test_function_typedef(self): + py.test.skip("using really obscure C syntax") + ffi = FFI(backend=self.Backend()) + ffi.cdef(""" + typedef double func_t(double); + func_t sin; + """) + m = ffi.dlopen("m") + x = m.sin(1.23) + assert x == math.sin(1.23) |