Skip to content

Commit 5f05f60

Browse files
committed
Cleanup
1 parent 91a2aba commit 5f05f60

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

bfs_test.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
)
77

88
func TestBFS(t *testing.T) {
9-
gm := New(10)
9+
g := New(10)
1010
for _, e := range []struct {
1111
v, w int
1212
}{
@@ -15,12 +15,11 @@ func TestBFS(t *testing.T) {
1515
{2, 3}, {5, 6},
1616
{3, 6}, {8, 9}, {4, 4},
1717
} {
18-
gm.AddBoth(e.v, e.w)
18+
g.AddBoth(e.v, e.w)
1919
}
20-
g := Sort(gm)
2120
exp := "0147925836"
2221
res := "0"
23-
BFS(g, 0, func(v, w int, c int64) {
22+
BFS(Sort(g), 0, func(v, w int, c int64) {
2423
res += strconv.Itoa(w)
2524
})
2625
if mess, diff := diff(res, exp); diff {

0 commit comments

Comments
 (0)