MCPcopy Index your code
hub / github.com/TheAlgorithms/Go / TestWalk

Function TestWalk

structure/linkedlist/cyclic_test.go:32–42  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

30}
31
32func TestWalk(t *testing.T) {
33 list := NewCyclic[int]()
34 fillList(list, 3)
35
36 want := 1
37 got := list.Walk()
38
39 if got.Val != want {
40 t.Errorf("got: %v, want: nil", got)
41 }
42}
43
44func TestRotate(t *testing.T) {
45 type testCase struct {

Callers

nothing calls this directly

Calls 2

fillListFunction · 0.85
WalkMethod · 0.80

Tested by

no test coverage detected