There are different approaches for programatically verifying the clockboard code produces the correct output. The extreme example would generate the results for some input, then we would manually inspect it, and check it in as a "golden file." The unit test would just assert the output is exactly the same. This is a brittle test, and not too interesting in this case.
But there are some basic properties in the output we could check -- like that the number of polygons generated corresponds to the radii and num_segments. And we could check the points in the polygon are within the correct distance of the center point.
There are different approaches for programatically verifying the clockboard code produces the correct output. The extreme example would generate the results for some input, then we would manually inspect it, and check it in as a "golden file." The unit test would just assert the output is exactly the same. This is a brittle test, and not too interesting in this case.
But there are some basic properties in the output we could check -- like that the number of polygons generated corresponds to the radii and num_segments. And we could check the points in the polygon are within the correct distance of the center point.