MCPcopy Index your code
hub / github.com/cli/cli / Test_StringSlice_Remove

Function Test_StringSlice_Remove

pkg/set/string_set_test.go:18–27  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

16}
17
18func Test_StringSlice_Remove(t *testing.T) {
19 s := NewStringSet()
20 s.Add("one")
21 s.Add("two")
22 s.Add("three")
23 s.Remove("two")
24 assert.Equal(t, []string{"one", "three"}, s.ToSlice())
25 assert.False(t, s.Contains("two"))
26 assert.Equal(t, 2, s.Len())
27}

Callers

nothing calls this directly

Calls 7

NewStringSetFunction · 0.85
EqualMethod · 0.80
ContainsMethod · 0.80
AddMethod · 0.65
RemoveMethod · 0.65
ToSliceMethod · 0.65
LenMethod · 0.65

Tested by

no test coverage detected