diff options
author | Armin Rigo <arigo@tunes.org> | 2017-05-29 20:37:10 +0200 |
---|---|---|
committer | Armin Rigo <arigo@tunes.org> | 2017-05-29 20:37:10 +0200 |
commit | eb4e72344dcadb7f4381bccabe6b7e825613f548 (patch) | |
tree | ec4be4bb459be7e410c2b38562539bd4dffdea7f /testing/cffi0 | |
parent | 59a7c77ee28ac6ef2c89423a7e1a0d3864ef0836 (diff) | |
download | cffi-eb4e72344dcadb7f4381bccabe6b7e825613f548.tar.gz |
More tweaks, more tests, try harder to avoid including <complex.h>
because it is not necessarily there
Diffstat (limited to 'testing/cffi0')
-rw-r--r-- | testing/cffi0/test_verify.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/testing/cffi0/test_verify.py b/testing/cffi0/test_verify.py index 53c3f3f..4b9e6d9 100644 --- a/testing/cffi0/test_verify.py +++ b/testing/cffi0/test_verify.py @@ -239,17 +239,19 @@ def test_primitive_category(): tp = model.PrimitiveType(typename) C = tp.is_char_type() F = tp.is_float_type() + X = tp.is_complex_type() I = tp.is_integer_type() assert C == (typename in ('char', 'wchar_t')) - assert F == (typename in ('float', 'double', 'long double', 'float _Complex', 'double _Complex')) - assert I + F + C == 1 # one and only one of them is true + assert F == (typename in ('float', 'double', 'long double')) + assert X == (typename in ('float _Complex', 'double _Complex')) + assert I + F + C + X == 1 # one and only one of them is true def test_all_integer_and_float_types(): typenames = [] for typename in all_primitive_types: if (all_primitive_types[typename] == 'c' or - typename == '_Bool' or typename == 'long double' - or '_Complex' in typename): # omit _Complex since ffi does not yet support + all_primitive_types[typename] == 'j' or # complex + typename == '_Bool' or typename == 'long double'): pass else: typenames.append(typename) |