diff --git a/tst/standard/weights.tst b/tst/standard/weights.tst index d38b346f3..9e5d2abdf 100644 --- a/tst/standard/weights.tst +++ b/tst/standard/weights.tst @@ -245,6 +245,11 @@ Error, no method found! For debugging hints type ?Recovery from NoMethodFound Error, no 1st choice method found for `EdgeWeightedDigraphShortestPaths' on 2 \ arguments +# Shortest path: same vertex +gap> d := EdgeWeightedDigraph([[2], [3], [1]], [[-3], [-5], [-7]]);; +gap> EdgeWeightedDigraphShortestPath(d, 2, 2); +fail + # Shortest paths: Johnson gap> d := EdgeWeightedDigraph([[2], [3], [], [], []], [[3], [5], [], [], []]); @@ -261,6 +266,9 @@ rec( distances := [ [ 0, 3, 8, fail, fail ], [ fail, 0, 5, fail, fail ], parents := [ [ fail, 1, 2, fail, fail ], [ fail, fail, 2, fail, fail ], [ fail, fail, fail, fail, fail ], [ fail, fail, fail, fail, fail ], [ fail, fail, fail, fail, fail ] ] ) +gap> EdgeWeightedDigraphShortestPaths(d, 6); +Error, the 2nd argument must be a vertex of the digraph tha\ +t is the 1st argument, gap> EdgeWeightedDigraphShortestPath(d, 1, 3); [ [ 1, 2, 3 ], [ 1, 1 ] ]