(t *testing.T)
| 471 | } |
| 472 | |
| 473 | func TestSearchToken(t *testing.T) { |
| 474 | tokens := []uint32{3, 5} |
| 475 | |
| 476 | assert.Equal(t, 0, searchToken(tokens, 0)) |
| 477 | assert.Equal(t, 1, searchToken(tokens, 3)) |
| 478 | assert.Equal(t, 1, searchToken(tokens, 4)) |
| 479 | assert.Equal(t, 0, searchToken(tokens, 5)) |
| 480 | assert.Equal(t, 0, searchToken(tokens, 7)) |
| 481 | } |
| 482 | |
| 483 | func BenchmarkSearchToken(b *testing.B) { |
| 484 | r := rand.New(rand.NewSource(time.Now().UnixNano())) |
nothing calls this directly
no test coverage detected