(t *testing.T)
| 22 | } |
| 23 | |
| 24 | func TestGetChildName(t *testing.T) { |
| 25 | testCases := map[OpPath]string{ |
| 26 | ``: ``, |
| 27 | `.baz`: `baz`, |
| 28 | `$baz`: `baz`, |
| 29 | `$`: ``, |
| 30 | `*.baz`: `baz`, |
| 31 | `*..baz`: `baz`, |
| 32 | "deployments['baz']": `baz`, |
| 33 | `deployments["baz"]`: `baz`, |
| 34 | } |
| 35 | |
| 36 | for input, expected := range testCases { |
| 37 | actual := input.getChildName() |
| 38 | if expected != actual { |
| 39 | t.Errorf("TestCase %s\nactual:%s\nexpected:%s", input, actual, expected) |
| 40 | } |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | func TestGetParentPath(t *testing.T) { |
| 45 | testCases := map[OpPath]string{ |
nothing calls this directly
no test coverage detected