(t *testing.T)
| 317 | } |
| 318 | |
| 319 | func 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 | |
| 331 | func TestMergeNodesWithDifferentKinds(t *testing.T) { |
| 332 | // Test merging nodes of different kinds (should return override) |