Skip to content

Commit e388b36

Browse files
committed
lint
1 parent c513bbf commit e388b36

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

example_dfs_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const (
1414
// The package doesn't support vertex labeling. However,
1515
// since vertices are always numbered 0..n-1, it's easy
1616
// to add this type of data on the side. This implementation
17-
// of depth-first search uses seperate slices to keep track of
17+
// of depth-first search uses separate slices to keep track of
1818
// vertex colors, predecessors and discovery times.
1919
type DFSData struct {
2020
Time int

strong_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func TestStrongComponents(t *testing.T) {
2626
g.Add(7, 6)
2727
g.Add(7, 7)
2828
g.Add(8, 8)
29-
exp := [][]int{[]int{2, 1, 0}, []int{6, 4}, []int{5, 3}, []int{7}, []int{8}, []int{9}}
29+
exp := [][]int{{2, 1, 0}, {6, 4}, {5, 3}, {7}, {8}, {9}}
3030
if mess, diff := diff(StrongComponents(g), exp); diff {
3131
t.Errorf("StronglyConnected %s", mess)
3232
}

weak_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ func TestComponents(t *testing.T) {
1414
}
1515

1616
g = New(1)
17-
if mess, diff := diff(Components(g), [][]int{[]int{0}}); diff {
17+
if mess, diff := diff(Components(g), [][]int{{0}}); diff {
1818
t.Errorf("Components %s", mess)
1919
}
2020
if mess, diff := diff(Connected(g), true); diff {
2121
t.Errorf("Connected %s", mess)
2222
}
2323

2424
g.Add(0, 0)
25-
if mess, diff := diff(Components(g), [][]int{[]int{0}}); diff {
25+
if mess, diff := diff(Components(g), [][]int{{0}}); diff {
2626
t.Errorf("Components %s", mess)
2727
}
2828
if mess, diff := diff(Connected(g), true); diff {
@@ -32,7 +32,7 @@ func TestComponents(t *testing.T) {
3232
g = New(4)
3333
g.Add(0, 1)
3434
g.Add(2, 1)
35-
if mess, diff := diff(Components(g), [][]int{[]int{0, 1, 2}, []int{3}}); diff {
35+
if mess, diff := diff(Components(g), [][]int{{0, 1, 2}, {3}}); diff {
3636
t.Errorf("Components %s", mess)
3737
}
3838
if mess, diff := diff(Connected(g), false); diff {
@@ -43,7 +43,7 @@ func TestComponents(t *testing.T) {
4343
g.AddBoth(1, 2)
4444
g.AddBoth(2, 3)
4545
g.AddBoth(0, 3)
46-
if mess, diff := diff(Components(g), [][]int{[]int{0, 1, 2, 3}}); diff {
46+
if mess, diff := diff(Components(g), [][]int{{0, 1, 2, 3}}); diff {
4747
t.Errorf("Components %s", mess)
4848
}
4949
if mess, diff := diff(Connected(g), true); diff {

0 commit comments

Comments
 (0)