fkromer / hypothesis-ros

Data generators for Property Based Testing and Fuzzy Testing of ROS1 nodes.
https://hypothesis-ros.readthedocs.io
Apache License 2.0
15 stars 4 forks source link

ROS1 variable-length array #29

Closed fkromer closed 6 years ago

fkromer commented 6 years ago

wiki.ros.org - 2.1.1 Field Types

In Python 2 and Python 3 implemented with tuple. Use hypothesis tuples() strategy and provide convenient interface (comparable to signature of hypothesis.strategies.lists(elements=None, min_size=None, max_size=None, unique_by=None, unique=False)). Due to performance (and memory) using list strategy and converting it to tuple no option. One strategy for fixed and variable length array #28 (parameters).

fkromer commented 6 years ago

quick and dirty implementation with hypothesis.strategies.lists(): https://github.com/ros-testing/hypothesis-ros/commit/8e369bae7202a437dd3d1216b87855126f09c02e