MCPcopy Index your code
hub / github.com/TomWright/dasel / TestUnorderedData

Function TestUnorderedData

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

Source from the content-addressed store, hash-verified

185}
186
187func TestUnorderedData(t *testing.T) {
188 m := orderedmap.NewMap()
189 m.Set("a", 1)
190 m.Set("b", 2)
191
192 data := m.UnorderedData()
193 if len(data) != 2 {
194 t.Fatalf("expected 2 entries, got %d", len(data))
195 }
196 if data["a"] != 1 || data["b"] != 2 {
197 t.Fatalf("unexpected data: %v", data)
198 }
199}

Callers

nothing calls this directly

Calls 3

SetMethod · 0.95
UnorderedDataMethod · 0.95
NewMapFunction · 0.92

Tested by

no test coverage detected