(t *testing.T)
| 169 | } |
| 170 | |
| 171 | func TestSetMapValue(t *testing.T) { |
| 172 | n := &yaml.Node{Kind: yaml.MappingNode, Content: make([]*yaml.Node, 0)} |
| 173 | node.SetMapValue(n, "Test", &yaml.Node{Kind: yaml.ScalarNode, Value: "Val"}) |
| 174 | if len(n.Content) != 2 || n.Content[0].Value != "Test" || n.Content[1].Value != "Val" { |
| 175 | t.Errorf("Unexpected length or content, len is %v", len(n.Content)) |
| 176 | } |
| 177 | node.SetMapValue(n, "Test", &yaml.Node{Kind: yaml.ScalarNode, Value: "Val2"}) |
| 178 | if n.Content[1].Value != "Val2" { |
| 179 | t.Errorf("Unexpected value: %v", n.Content[1].Value) |
| 180 | } |
| 181 | } |
| 182 | |
| 183 | func TestDiff(t *testing.T) { |
| 184 |
nothing calls this directly
no test coverage detected