MCPcopy Index your code
hub / github.com/git-lfs/git-lfs / TestOrderedSetRemove

Function TestOrderedSetRemove

tools/ordered_set_test.go:146–156  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

144}
145
146func TestOrderedSetRemove(t *testing.T) {
147 s1 := NewOrderedSetFromSlice([]string{"a", "b"})
148
149 assert.True(t, s1.Contains("a"), "tools: expected [a, b] to contain 'a'")
150 assert.True(t, s1.Contains("b"), "tools: expected [a, b] to contain 'b'")
151
152 s1.Remove("a")
153
154 assert.False(t, s1.Contains("a"), "tools: did not expect to find 'a' in [b]")
155 assert.True(t, s1.Contains("b"), "tools: expected [b] to contain 'b'")
156}
157
158func TestOrderedSetCardinality(t *testing.T) {
159 s1 := NewOrderedSetFromSlice([]string{"a", "b"})

Callers

nothing calls this directly

Calls 3

NewOrderedSetFromSliceFunction · 0.85
ContainsMethod · 0.65
RemoveMethod · 0.45

Tested by

no test coverage detected