add StringSet.HasAny

This commit is contained in:
deads2k
2015-04-29 11:24:38 -04:00
parent 8fa21ebd62
commit f258717f26
2 changed files with 22 additions and 0 deletions

View File

@@ -117,3 +117,15 @@ func TestStringSetDifference(t *testing.T) {
t.Errorf("Unexpected contents: %#v", d.List())
}
}
func TestStringSetHasAny(t *testing.T) {
a := NewStringSet("1", "2", "3")
if !a.HasAny("1", "4") {
t.Errorf("expected true, got false")
}
if a.HasAny("0", "4") {
t.Errorf("expected false, got true")
}
}