Author: Armin Rigo <[email protected]>
Branch:
Changeset: r876:a5db4344e898
Date: 2012-08-23 13:53 +0200
http://bitbucket.org/cffi/cffi/changeset/a5db4344e898/
Log: One extra test
diff --git a/testing/test_verify.py b/testing/test_verify.py
--- a/testing/test_verify.py
+++ b/testing/test_verify.py
@@ -837,6 +837,18 @@
assert lib.AA == 0
assert lib.BB == 2
+def test_typedef_enum_as_function_result():
+ ffi = FFI()
+ ffi.cdef("""
+ typedef enum { AA, BB, ... } foo_t;
+ foo_t foo_func(int x);
+ """)
+ lib = ffi.verify("""
+ typedef enum { AA, CC, BB } foo_t;
+ foo_t foo_func(int x) { return x; }
+ """)
+ assert lib.foo_func(lib.BB) == "BB"
+
def test_callback_calling_convention():
py.test.skip("later")
if sys.platform != 'win32':
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit