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

Function TestSetUint8

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

Source from the content-addressed store, hash-verified

45}
46
47func TestSetUint8(t *testing.T) {
48 t.Parallel()
49 m := New[uint8, int]()
50
51 m.Set(1, 128) // insert
52 value, ok := m.Get(1)
53 assert.True(t, ok)
54 assert.Equal(t, 128, value)
55
56 m.Set(2, 200) // insert
57 assert.Equal(t, 2, m.Len())
58 value, ok = m.Get(2)
59 assert.True(t, ok)
60 assert.Equal(t, 200, value)
61}
62
63func TestSetInt16(t *testing.T) {
64 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…