diff options
author | Armin Rigo <arigo@tunes.org> | 2012-06-03 21:05:26 +0200 |
---|---|---|
committer | Armin Rigo <arigo@tunes.org> | 2012-06-03 21:05:26 +0200 |
commit | 394ba7c59a2824f3a0afff5a21432e7373b5a500 (patch) | |
tree | 820b8e936b344798bb29aba01180f0e29a320e7b /testing/test_function.py | |
parent | 1aef378ff9f3a0ab1b24cc61f3061c733db39327 (diff) | |
download | cffi-394ba7c59a2824f3a0afff5a21432e7373b5a500.tar.gz |
Complete the tests.
Works on _ffi_backend, but not on backend_ctypes...
Diffstat (limited to 'testing/test_function.py')
-rw-r--r-- | testing/test_function.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/testing/test_function.py b/testing/test_function.py index 1eda88c..e7b4e5f 100644 --- a/testing/test_function.py +++ b/testing/test_function.py @@ -195,7 +195,14 @@ class TestFunction(object): assert str(q) == "world!" def test_function_with_struct_argument(self): - py.test.skip("in-progress") + ffi = FFI(backend=self.Backend()) + ffi.cdef(""" + struct in_addr { unsigned int s_addr; }; + char *inet_ntoa(struct in_addr in); + """) + ina = ffi.new("struct in_addr", [0x04040404]) + a = ffi.C.inet_ntoa(ina[0]) + assert str(a) == '4.4.4.4' def test_function_with_struct_return(self): - py.test.skip("in-progress") + py.test.skip("this is a GNU C extension") |