MCPcopy
hub / github.com/cortexlabs/cortex / TestCopy

Function TestCopy

pkg/lib/sets/strset/strset_test.go:152–166  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

150}
151
152func TestCopy(t *testing.T) {
153 set := strset.New()
154 cset := set.Copy()
155 require.Equal(t, 0, len(cset))
156
157 set = strset.New("a", "b")
158 cset = set.Copy()
159 require.Equal(t, 2, len(cset))
160 if _, ok := set["a"]; !ok {
161 require.FailNow(t, "a not found in set")
162 }
163 if _, ok := set["b"]; !ok {
164 require.FailNow(t, "b not found in set")
165 }
166}
167
168func TestSlice(t *testing.T) {
169 set := strset.New()

Callers

nothing calls this directly

Calls 3

NewFunction · 0.92
EqualMethod · 0.80
CopyMethod · 0.45

Tested by

no test coverage detected