(t *testing.T)
| 336 | } |
| 337 | |
| 338 | func TestGetEntryFromInvalidIndex(t *testing.T) { |
| 339 | t.Parallel() |
| 340 | |
| 341 | // given |
| 342 | queue := NewBytesQueue(1, 0, false) |
| 343 | queue.Push([]byte("a")) |
| 344 | |
| 345 | // when |
| 346 | result, err := queue.Get(0) |
| 347 | err2 := queue.CheckGet(0) |
| 348 | |
| 349 | // then |
| 350 | assertEqual(t, err, err2) |
| 351 | assertEqual(t, []byte(nil), result) |
| 352 | assertEqual(t, "Index must be greater than zero. Invalid index.", err.Error()) |
| 353 | } |
| 354 | |
| 355 | func TestGetEntryFromIndexOutOfRange(t *testing.T) { |
| 356 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…