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

Function TestSetInt16

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

Source from the content-addressed store, hash-verified

61}
62
63func TestSetInt16(t *testing.T) {
64 t.Parallel()
65 m := New[int16, int]()
66
67 m.Set(1, 128) // insert
68 value, ok := m.Get(1)
69 assert.True(t, ok)
70 assert.Equal(t, 128, value)
71
72 m.Set(2, 200) // insert
73 assert.Equal(t, 2, m.Len())
74 value, ok = m.Get(2)
75 assert.True(t, ok)
76 assert.Equal(t, 200, value)
77}
78
79func TestSetFloat32(t *testing.T) {
80 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…