(t *testing.T)
| 320 | } |
| 321 | |
| 322 | func TestGetEntryFromIndex(t *testing.T) { |
| 323 | t.Parallel() |
| 324 | |
| 325 | // given |
| 326 | queue := NewBytesQueue(20, 0, false) |
| 327 | |
| 328 | // when |
| 329 | queue.Push([]byte("a")) |
| 330 | index, _ := queue.Push([]byte("b")) |
| 331 | queue.Push([]byte("c")) |
| 332 | result, _ := queue.Get(index) |
| 333 | |
| 334 | // then |
| 335 | assertEqual(t, []byte("b"), result) |
| 336 | } |
| 337 | |
| 338 | func TestGetEntryFromInvalidIndex(t *testing.T) { |
| 339 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…