As such, these tests essentially verify that the code ran without error, data types are expected, and that the robots moved from their original positions.
However, they should really also check that the implementation of the behavior worked correctly. Let's take a repulsive behavior, for example. A valuable test would do something like this:
Start N robots in known poses
Apply a repulsion rule for a particular time step
Verify that the two robots moved to the expected new poses -- for example, if they started at positions (0.0, 0.0) and (0.1, 0.1), their new positions might be something like (-0.05, -0.05) and (0.15, 0.15) given the actual rules.
Please consider implementing this in the unit tests.
Right now, the unit tests provided in this tool do some very basic checks. For example:
As such, these tests essentially verify that the code ran without error, data types are expected, and that the robots moved from their original positions.
However, they should really also check that the implementation of the behavior worked correctly. Let's take a repulsive behavior, for example. A valuable test would do something like this:
(0.0, 0.0)
and(0.1, 0.1)
, their new positions might be something like(-0.05, -0.05)
and(0.15, 0.15)
given the actual rules.Please consider implementing this in the unit tests.
https://github.com/openjournals/joss-reviews/issues/5647