diff options
author | Armin Rigo <arigo@tunes.org> | 2012-06-16 11:35:08 +0200 |
---|---|---|
committer | Armin Rigo <arigo@tunes.org> | 2012-06-16 11:35:08 +0200 |
commit | e7703767a9f409e69e4036ebff8bc5d958426e7d (patch) | |
tree | e085f9d704f7475f0cc37e74039615ac3642cc7f /testing/test_function.py | |
parent | 5506833784fe017b8e755875f87562b4df76fee6 (diff) | |
download | cffi-e7703767a9f409e69e4036ebff8bc5d958426e7d.tar.gz |
Test and fix.
Diffstat (limited to 'testing/test_function.py')
-rw-r--r-- | testing/test_function.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/testing/test_function.py b/testing/test_function.py index 18d77af..1a0ca72 100644 --- a/testing/test_function.py +++ b/testing/test_function.py @@ -53,6 +53,16 @@ class TestFunction(object): assert x != math.sin(1.23) # rounding effects assert abs(x - math.sin(1.23)) < 1E-6 + def test_sin_no_return_value(self): + # check that 'void'-returning functions work too + ffi = FFI(backend=self.Backend()) + ffi.cdef(""" + void sin(double x); + """) + m = ffi.dlopen("m") + x = m.sin(1.23) + assert x is None + def test_tlsalloc(self): if sys.platform != 'win32': py.test.skip("win32 only") |