Skip to content

Commit

Permalink
test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
arigo committed Aug 12, 2024
1 parent c9ba004 commit fcb8594
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 2 additions & 0 deletions testing/cffi1/test_parse_c_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ def test_simple():
("long double", lib._CFFI_PRIM_LONGDOUBLE),
(" float _Complex", lib._CFFI_PRIM_FLOATCOMPLEX),
("double _Complex ", lib._CFFI_PRIM_DOUBLECOMPLEX),
("_cffi_float_complex_t", lib._CFFI_PRIM_FLOATCOMPLEX),
(" _cffi_double_complex_t", lib._CFFI_PRIM_DOUBLECOMPLEX),
]:
assert parse(simple_type) == ['->', Prim(expected)]

Expand Down
4 changes: 1 addition & 3 deletions testing/cffi1/test_realize_c_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,8 @@ def test_funcptr_rewrite_args():
check("int(*)(long[5])", "int(*)(long *)")

def test_all_primitives():
mapping = {"_cffi_float_complex_t": "float _Complex",
"_cffi_double_complex_t": "double _Complex"}
for name in cffi_opcode.PRIMITIVE_TO_INDEX:
check(name, mapping.get(name, name))
check(name, name)

def check_func(input, expected_output=None):
import _cffi_backend
Expand Down

0 comments on commit fcb8594

Please sign in to comment.