(t *testing.T)
| 85 | } |
| 86 | |
| 87 | func TestDestroy(t *testing.T) { |
| 88 | list := NewCyclic[int]() |
| 89 | fillList(list, 3) |
| 90 | wantSize := 0 |
| 91 | list.Destroy() |
| 92 | |
| 93 | got := list.Head |
| 94 | |
| 95 | if got != nil { |
| 96 | t.Errorf("got: %v, want: nil", got) |
| 97 | } |
| 98 | |
| 99 | if wantSize != list.Size { |
| 100 | t.Errorf("got: %v, want: %v", got, wantSize) |
| 101 | } |
| 102 | } |
| 103 | |
| 104 | func TestJosephusProblem(t *testing.T) { |
| 105 | type testCase struct { |