mirror of
https://github.com/fluencelabs/tendermint
synced 2025-04-25 14:52:17 +00:00
15 lines
339 B
Go
15 lines
339 B
Go
|
package common
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
|
||
|
"github.com/stretchr/testify/assert"
|
||
|
)
|
||
|
|
||
|
func TestStringInSlice(t *testing.T) {
|
||
|
assert.True(t, StringInSlice("a", []string{"a", "b", "c"}))
|
||
|
assert.False(t, StringInSlice("d", []string{"a", "b", "c"}))
|
||
|
assert.True(t, StringInSlice("", []string{""}))
|
||
|
assert.False(t, StringInSlice("", []string{}))
|
||
|
}
|