blob: a4f3ffb943ae527e9a20261d90e18f77fe47ec40 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
package utils_test
import (
"github.com/stretchr/testify/suite"
"testing"
"github.com/pseudomuto/protokit/utils"
)
type StringsTest struct {
suite.Suite
}
func TestStrings(t *testing.T) {
suite.Run(t, new(StringsTest))
}
func (assert *StringsTest) TestInStringSlice() {
vals := []string{"val1", "val2"}
assert.True(utils.InStringSlice(vals, "val1"))
assert.False(utils.InStringSlice(vals, "wat"))
}
|