MCPcopy
hub / github.com/TomWright/dasel / TestDeleteNonExistent

Function TestDeleteNonExistent

model/orderedmap/map_test.go:72–79  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

70}
71
72func TestDeleteNonExistent(t *testing.T) {
73 m := orderedmap.NewMap()
74 m.Set("a", 1)
75 m.Delete("nope") // no-op
76 if m.Len() != 1 {
77 t.Fatalf("expected Len 1, got %d", m.Len())
78 }
79}
80
81func TestLen(t *testing.T) {
82 m := orderedmap.NewMap()

Callers

nothing calls this directly

Calls 4

SetMethod · 0.95
DeleteMethod · 0.95
LenMethod · 0.95
NewMapFunction · 0.92

Tested by

no test coverage detected