Skip to content
This repository was archived by the owner on Sep 20, 2023. It is now read-only.

Commit a11c975

Browse files
committed
141 finish
1 parent dcd7201 commit a11c975

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Algorithms/0141.linked-list-cycle/linked-list-cycle_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010

1111
// tcs is testcase slice
1212
var tcs = []struct {
13-
head []int
13+
ints []int
1414
pos int
1515
ans bool
1616
}{
@@ -58,15 +58,15 @@ func Test_hasCycle(t *testing.T) {
5858
ast := assert.New(t)
5959

6060
for _, tc := range tcs {
61-
head := kit.Ints2ListWithCycle(tc.head, tc.pos)
61+
head := kit.Ints2ListWithCycle(tc.ints, tc.pos)
6262
ast.Equal(tc.ans, hasCycle(head), "输入:%v", tc)
6363
}
6464
}
6565

6666
func Benchmark_hasCycle(b *testing.B) {
6767
for i := 0; i < b.N; i++ {
6868
for _, tc := range tcs {
69-
head := kit.Ints2ListWithCycle(tc.head, tc.pos)
69+
head := kit.Ints2ListWithCycle(tc.ints, tc.pos)
7070
hasCycle(head)
7171
}
7272
}

0 commit comments

Comments
 (0)