Create proptest tests for ShortestPaths using our graph generation ~strategies~ strategies. Test both algorithms (Dijkstra, Bellman-Ford). ~Use DebugGraph as the graph being generated because it provides very useful information in case of a failed assert.~
What properties to test? ~One possibility is to implement a function for removing isolated vertices from a graph so that the tested graphs are connected. Then,~ For connected graphs after finishing an algorithm, it should be possible to reconstruct path and get distance from every vertex in the graph to the starting vertex. Also, the distances (not the paths, generally) should be equal as returned by Dijkstra and Bellman-Ford.
In #64 I added proptests that at least check that the algorithms do not panic. But the properties mentioned in the original post in this issue should still be added.
Create proptest tests for
ShortestPaths
using our graph generation ~strategies~ strategies. Test both algorithms (Dijkstra, Bellman-Ford). ~UseDebugGraph
as the graph being generated because it provides very useful information in case of a failed assert.~What properties to test? ~One possibility is to implement a function for removing isolated vertices from a graph so that the tested graphs are connected. Then,~ For connected graphs after finishing an algorithm, it should be possible to reconstruct path and get distance from every vertex in the graph to the starting vertex. Also, the distances (not the paths, generally) should be equal as returned by Dijkstra and Bellman-Ford.