diff options
author | Armin Rigo <arigo@tunes.org> | 2016-04-21 12:29:45 +0200 |
---|---|---|
committer | Armin Rigo <arigo@tunes.org> | 2016-04-21 12:29:45 +0200 |
commit | 79d0a6ae494118eaaeecade49e356ba49ee11a3c (patch) | |
tree | 92b4b9b5231ca9a3234195f3ca479b9555ec86b6 | |
parent | 203916db07390483459174dec49908881aeedc3a (diff) | |
download | cffi-79d0a6ae494118eaaeecade49e356ba49ee11a3c.tar.gz |
Windows fix: 'struct a' is a great name for being predefined and not reusable
-rw-r--r-- | testing/cffi0/test_ffi_backend.py | 12 | ||||
-rw-r--r-- | testing/cffi1/test_recompiler.py | 18 |
2 files changed, 15 insertions, 15 deletions
diff --git a/testing/cffi0/test_ffi_backend.py b/testing/cffi0/test_ffi_backend.py index b96bae4..0d25a0d 100644 --- a/testing/cffi0/test_ffi_backend.py +++ b/testing/cffi0/test_ffi_backend.py @@ -466,12 +466,12 @@ class TestBitfield: def test_introspect_order(self): ffi = FFI() - ffi.cdef("union aaa { int a; }; typedef struct ccc { int a; } b;") - ffi.cdef("union g { int a; }; typedef struct cc { int a; } bbb;") - ffi.cdef("union aa { int a; }; typedef struct a { int a; } bb;") - assert ffi.list_types() == (['b', 'bb', 'bbb'], - ['a', 'cc', 'ccc'], - ['aa', 'aaa', 'g']) + ffi.cdef("union CFFIaaa { int a; }; typedef struct CFFIccc { int a; } CFFIb;") + ffi.cdef("union CFFIg { int a; }; typedef struct CFFIcc { int a; } CFFIbbb;") + ffi.cdef("union CFFIaa { int a; }; typedef struct CFFIa { int a; } CFFIbb;") + assert ffi.list_types() == (['CFFIb', 'CFFIbb', 'CFFIbbb'], + ['CFFIa', 'CFFIcc', 'CFFIccc'], + ['CFFIaa', 'CFFIaaa', 'CFFIg']) def test_unpack(self): ffi = FFI() diff --git a/testing/cffi1/test_recompiler.py b/testing/cffi1/test_recompiler.py index c333a40..2602e01 100644 --- a/testing/cffi1/test_recompiler.py +++ b/testing/cffi1/test_recompiler.py @@ -1897,14 +1897,14 @@ def test_introspect_included_type(): def test_introspect_order(): ffi = FFI() - ffi.cdef("union aaa { int a; }; typedef struct ccc { int a; } b;") - ffi.cdef("union g { int a; }; typedef struct cc { int a; } bbb;") - ffi.cdef("union aa { int a; }; typedef struct a { int a; } bb;") + ffi.cdef("union CFFIaaa { int a; }; typedef struct CFFIccc { int a; } CFFIb;") + ffi.cdef("union CFFIg { int a; }; typedef struct CFFIcc { int a; } CFFIbbb;") + ffi.cdef("union CFFIaa { int a; }; typedef struct CFFIa { int a; } CFFIbb;") verify(ffi, "test_introspect_order", """ - union aaa { int a; }; typedef struct ccc { int a; } b; - union g { int a; }; typedef struct cc { int a; } bbb; - union aa { int a; }; typedef struct a { int a; } bb; + union CFFIaaa { int a; }; typedef struct CFFIccc { int a; } CFFIb; + union CFFIg { int a; }; typedef struct CFFIcc { int a; } CFFIbbb; + union CFFIaa { int a; }; typedef struct CFFIa { int a; } CFFIbb; """) - assert ffi.list_types() == (['b', 'bb', 'bbb'], - ['a', 'cc', 'ccc'], - ['aa', 'aaa', 'g']) + assert ffi.list_types() == (['CFFIb', 'CFFIbb', 'CFFIbbb'], + ['CFFIa', 'CFFIcc', 'CFFIccc'], + ['CFFIaa', 'CFFIaaa', 'CFFIg']) |