(t *testing.T)
| 173 | } |
| 174 | |
| 175 | func TestEmptyFull(t *testing.T) { |
| 176 | ns := []int{47, 123} |
| 177 | for _, n := range ns { |
| 178 | bA := NewBitArray(n) |
| 179 | if !bA.IsEmpty() { |
| 180 | t.Fatal("Expected bit array to be empty") |
| 181 | } |
| 182 | for i := 0; i < n; i++ { |
| 183 | bA.SetIndex(i, true) |
| 184 | } |
| 185 | if !bA.IsFull() { |
| 186 | t.Fatal("Expected bit array to be full") |
| 187 | } |
| 188 | } |
| 189 | } |
| 190 | |
| 191 | func TestUpdateNeverPanics(t *testing.T) { |
| 192 | newRandBitArray := func(n int) *BitArray { |
nothing calls this directly
no test coverage detected