github.com/badrootd/celestia-core@v0.0.0-20240305091328-aa4207a4b25d/state/txindex/kv/utils_test.go (about)

     1  package kv
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/stretchr/testify/assert"
     7  )
     8  
     9  func TestIntInSlice(t *testing.T) {
    10  	assert.True(t, intInSlice(1, []int{1, 2, 3}))
    11  	assert.False(t, intInSlice(4, []int{1, 2, 3}))
    12  	assert.True(t, intInSlice(0, []int{0}))
    13  	assert.False(t, intInSlice(0, []int{}))
    14  }