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

Function TestSetFloat64

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

Source from the content-addressed store, hash-verified

93}
94
95func TestSetFloat64(t *testing.T) {
96 t.Parallel()
97 m := New[float64, int]()
98
99 m.Set(1.1, 128) // insert
100 value, ok := m.Get(1.1)
101 assert.True(t, ok)
102 assert.Equal(t, 128, value)
103
104 m.Set(2.2, 200) // insert
105 assert.Equal(t, 2, m.Len())
106 value, ok = m.Get(2.2)
107 assert.True(t, ok)
108 assert.Equal(t, 200, value)
109}
110
111func TestSetInt64(t *testing.T) {
112 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…