(t *testing.T)
| 12 | } |
| 13 | |
| 14 | func TestAdd(t *testing.T) { |
| 15 | list := NewCyclic[int]() |
| 16 | fillList(list, 3) |
| 17 | |
| 18 | want := []any{1, 2, 3} |
| 19 | var got []any |
| 20 | var start *Node[int] |
| 21 | start = list.Head |
| 22 | |
| 23 | for i := 0; i < list.Size; i++ { |
| 24 | got = append(got, start.Val) |
| 25 | start = start.Next |
| 26 | } |
| 27 | if !reflect.DeepEqual(got, want) { |
| 28 | t.Errorf("got: %v, want: %v", got, want) |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | func TestWalk(t *testing.T) { |
| 33 | list := NewCyclic[int]() |
nothing calls this directly
no test coverage detected