From e7703767a9f409e69e4036ebff8bc5d958426e7d Mon Sep 17 00:00:00 2001 From: Armin Rigo Date: Sat, 16 Jun 2012 11:35:08 +0200 Subject: Test and fix. --- testing/test_function.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'testing/test_function.py') 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") -- cgit v1.2.1