Add tests for IsSet

This commit is contained in:
bep 2015-01-20 17:15:12 +01:00
parent ee34a840bc
commit 1b91fec0ac

View file

@ -361,6 +361,16 @@ func TestIntersect(t *testing.T) {
} }
} }
func TestIsSet(t *testing.T) {
aSlice := []interface{}{1, 2, 3, 5}
aMap := map[string]interface{}{"a": 1, "b": 2}
assert.True(t, IsSet(aSlice, 2))
assert.True(t, IsSet(aMap, "b"))
assert.False(t, IsSet(aSlice, 22))
assert.False(t, IsSet(aMap, "bc"))
}
func (x *TstX) TstRp() string { func (x *TstX) TstRp() string {
return "r" + x.A return "r" + x.A
} }