mirror of https://github.com/hashicorp/consul
16 lines
226 B
Go
16 lines
226 B
Go
|
package lib
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
func TestStrContains(t *testing.T) {
|
||
|
l := []string{"a", "b", "c"}
|
||
|
if !StrContains(l, "b") {
|
||
|
t.Fatalf("should contain")
|
||
|
}
|
||
|
if StrContains(l, "d") {
|
||
|
t.Fatalf("should not contain")
|
||
|
}
|
||
|
}
|