Enhance unit tests for algorithm
Enhance unit tests for algorithm

Added new tests that cover the problems we've had to fix which weren't
detected by the previous set of tests. Performed some refactoring to
remove boilerplate code from unit tests.

dxal34/antisweep,dxal34/antisweep