MCPcopy Create free account
hub / github.com/elliotchance/orderedmap / TestOrderedMap_Back

Function TestOrderedMap_Back

v2/orderedmap_test.go:268–279  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

266}
267
268func TestOrderedMap_Back(t *testing.T) {
269 t.Run("NilOnEmptyMap", func(t *testing.T) {
270 m := orderedmap.NewOrderedMap[int, bool]()
271 assert.Nil(t, m.Back())
272 })
273
274 t.Run("NilOnEmptyMap", func(t *testing.T) {
275 m := orderedmap.NewOrderedMap[int, bool]()
276 m.Set(1, true)
277 assert.NotNil(t, m.Back())
278 })
279}
280
281func TestOrderedMap_Copy(t *testing.T) {
282 t.Run("ReturnsEqualButNotSame", func(t *testing.T) {

Callers

nothing calls this directly

Calls 2

BackMethod · 0.95
SetMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…