(t *testing.T)
| 10 | ) |
| 11 | |
| 12 | func TestGetParentNotFound(t *testing.T) { |
| 13 | parent := &yaml.Node{ |
| 14 | Kind: yaml.DocumentNode, |
| 15 | } |
| 16 | |
| 17 | child := &yaml.Node{ |
| 18 | Kind: yaml.ScalarNode, |
| 19 | Value: "Child", |
| 20 | } |
| 21 | |
| 22 | pair := node.GetParent(child, parent, nil) |
| 23 | if pair.Value != nil { |
| 24 | t.Errorf("child should not have been found") |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | func TestGetParentFound(t *testing.T) { |
| 29 | parent := &yaml.Node{ |
nothing calls this directly
no test coverage detected