mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-08 06:15:33 +00:00
* libs/common: Refactor libs/common 01 Signed-off-by: Marko Baricevic <marbar3778@yahoo.com> * regenerate proto files, move intslice to where its used * update kv.KVPair(s) to kv.Pair(s) * add changelog entry * make intInSlice private
15 lines
289 B
Go
15 lines
289 B
Go
package kv
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestIntInSlice(t *testing.T) {
|
|
assert.True(t, intInSlice(1, []int{1, 2, 3}))
|
|
assert.False(t, intInSlice(4, []int{1, 2, 3}))
|
|
assert.True(t, intInSlice(0, []int{0}))
|
|
assert.False(t, intInSlice(0, []int{}))
|
|
}
|