File: strings_test.go

package info (click to toggle)
golang-github-pseudomuto-protokit 0.2.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 320 kB
  • sloc: makefile: 61
file content (23 lines) | stat: -rw-r--r-- 413 bytes parent folder | download | duplicates (2)
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"))
}