MCPcopy
hub / github.com/cornelk/hashmap / TestSetInt64

Function TestSetInt64

hashmap_test.go:111–125  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

109}
110
111func TestSetInt64(t *testing.T) {
112 t.Parallel()
113 m := New[int64, int]()
114
115 m.Set(1, 128) // insert
116 value, ok := m.Get(1)
117 assert.True(t, ok)
118 assert.Equal(t, 128, value)
119
120 m.Set(2, 200) // insert
121 assert.Equal(t, 2, m.Len())
122 value, ok = m.Get(2)
123 assert.True(t, ok)
124 assert.Equal(t, 200, value)
125}
126
127func TestInsert(t *testing.T) {
128 t.Parallel()

Callers

nothing calls this directly

Calls 6

TrueFunction · 0.92
EqualFunction · 0.92
NewFunction · 0.85
SetMethod · 0.80
GetMethod · 0.80
LenMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…