diff options
author | Armin Rigo <arigo@tunes.org> | 2020-07-19 12:35:40 +0200 |
---|---|---|
committer | Armin Rigo <arigo@tunes.org> | 2020-07-19 12:35:40 +0200 |
commit | cb9ed25dea2911d7eabd435a2f8499c8932a8e58 (patch) | |
tree | 1e42663e4acf9fade8f4cc85cc6c913294ff269a /testing | |
parent | e4bba72b9a9aa979f2111bd5b171d6afc4135daa (diff) | |
download | cffi-cb9ed25dea2911d7eabd435a2f8499c8932a8e58.tar.gz |
force calls via libffi. shows the problem recently solved on windows
Diffstat (limited to 'testing')
-rw-r--r-- | testing/cffi1/test_function_args.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/testing/cffi1/test_function_args.py b/testing/cffi1/test_function_args.py index d0eb154..56234f2 100644 --- a/testing/cffi1/test_function_args.py +++ b/testing/cffi1/test_function_args.py @@ -23,7 +23,10 @@ else: ] def _make_struct(s): return st.lists(s, min_size=1) - types = st.recursive(st.sampled_from(ALL_PRIMITIVES), _make_struct) + types = st.one_of(st.sampled_from(ALL_PRIMITIVES), + st.lists(st.sampled_from(ALL_PRIMITIVES), min_size=1)) + # NB. 'types' could be st.recursive instead, but it doesn't + # really seem useful def draw_primitive(ffi, typename): value = random.random() * 2**40 @@ -36,7 +39,7 @@ else: @given(st.lists(types), types) - @settings(max_examples=10) + @settings(max_examples=20) def test_types(tp_args, tp_result): global TEST_RUN_COUNTER cdefs = [] @@ -102,8 +105,8 @@ else: write(ffi.addressof(lib, 'testfargs_result'), returned_value) - ## CALL - received_return = lib.testfargs(*passed_args) + ## CALL forcing libffi + received_return = ffi.addressof(lib, 'testfargs')(*passed_args) ## _tp_long_double = ffi.typeof("long double") |