mirror of
https://github.com/gonum/gonum.git
synced 2025-10-27 17:21:18 +08:00
graph/path: fix error messages
This commit is contained in:
@@ -281,7 +281,7 @@ func TestAStarNullHeuristic(t *testing.T) {
|
|||||||
|
|
||||||
p, weight := pt.To(test.Query.To().ID())
|
p, weight := pt.To(test.Query.To().ID())
|
||||||
if weight != test.Weight {
|
if weight != test.Weight {
|
||||||
t.Errorf("%q: unexpected weight from Between: got:%f want:%f",
|
t.Errorf("%q: unexpected weight from To: got:%f want:%f",
|
||||||
test.Name, weight, test.Weight)
|
test.Name, weight, test.Weight)
|
||||||
}
|
}
|
||||||
if weight := pt.WeightTo(test.Query.To().ID()); weight != test.Weight {
|
if weight := pt.WeightTo(test.Query.To().ID()); weight != test.Weight {
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ func TestBellmanFordFrom(t *testing.T) {
|
|||||||
|
|
||||||
p, weight := pt.To(test.Query.To().ID())
|
p, weight := pt.To(test.Query.To().ID())
|
||||||
if weight != test.Weight {
|
if weight != test.Weight {
|
||||||
t.Errorf("%q: unexpected weight from Between: got:%f want:%f",
|
t.Errorf("%q: unexpected weight from To: got:%f want:%f",
|
||||||
test.Name, weight, test.Weight)
|
test.Name, weight, test.Weight)
|
||||||
}
|
}
|
||||||
if weight := pt.WeightTo(test.Query.To().ID()); weight != test.Weight {
|
if weight := pt.WeightTo(test.Query.To().ID()); weight != test.Weight {
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ func TestDijkstraFrom(t *testing.T) {
|
|||||||
|
|
||||||
p, weight := pt.To(test.Query.To().ID())
|
p, weight := pt.To(test.Query.To().ID())
|
||||||
if weight != test.Weight {
|
if weight != test.Weight {
|
||||||
t.Errorf("%q %s: unexpected weight from Between: got:%f want:%f",
|
t.Errorf("%q %s: unexpected weight from To: got:%f want:%f",
|
||||||
test.Name, tg.typ, weight, test.Weight)
|
test.Name, tg.typ, weight, test.Weight)
|
||||||
}
|
}
|
||||||
if weight := pt.WeightTo(test.Query.To().ID()); weight != test.Weight {
|
if weight := pt.WeightTo(test.Query.To().ID()); weight != test.Weight {
|
||||||
|
|||||||
Reference in New Issue
Block a user