MCPcopy Create free account
hub / github.com/aws-cloudformation/rain / TestAddMap

Function TestAddMap

internal/node/node_test.go:319–329  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

317}
318
319func TestAddMap(t *testing.T) {
320 parent := &yaml.Node{Kind: yaml.MappingNode, Content: make([]*yaml.Node, 0)}
321 m := node.AddMap(parent, "Test")
322 if m == nil {
323 t.Errorf("AddMap returned nil")
324 }
325 mm := node.AddMap(parent, "Test")
326 if m != mm {
327 t.Errorf("AddMap second add should return the same object")
328 }
329}
330
331func TestMergeNodesWithDifferentKinds(t *testing.T) {
332 // Test merging nodes of different kinds (should return override)

Callers

nothing calls this directly

Calls 1

AddMapFunction · 0.92

Tested by

no test coverage detected