(t *testing.T)
| 139 | } |
| 140 | |
| 141 | func TestString_Alias(t *testing.T) { |
| 142 | reporter := newMockReporter(t) |
| 143 | |
| 144 | value := NewString(reporter, "123") |
| 145 | assert.Equal(t, []string{"String()"}, value.chain.context.Path) |
| 146 | assert.Equal(t, []string{"String()"}, value.chain.context.AliasedPath) |
| 147 | |
| 148 | value.Alias("foo") |
| 149 | assert.Equal(t, []string{"String()"}, value.chain.context.Path) |
| 150 | assert.Equal(t, []string{"foo"}, value.chain.context.AliasedPath) |
| 151 | |
| 152 | childValue := value.AsNumber() |
| 153 | assert.Equal(t, []string{"String()", "AsNumber()"}, childValue.chain.context.Path) |
| 154 | assert.Equal(t, []string{"foo", "AsNumber()"}, childValue.chain.context.AliasedPath) |
| 155 | } |
| 156 | |
| 157 | func TestString_Path(t *testing.T) { |
| 158 | reporter := newMockReporter(t) |
nothing calls this directly
no test coverage detected
searching dependent graphs…