(t *testing.T)
| 257 | } |
| 258 | |
| 259 | func TestObject_Alias(t *testing.T) { |
| 260 | reporter := newMockReporter(t) |
| 261 | |
| 262 | value := NewObject(reporter, map[string]interface{}{ |
| 263 | "foo": 100.0, |
| 264 | }) |
| 265 | assert.Equal(t, []string{"Object()"}, value.chain.context.Path) |
| 266 | assert.Equal(t, []string{"Object()"}, value.chain.context.AliasedPath) |
| 267 | |
| 268 | value.Alias("bar") |
| 269 | assert.Equal(t, []string{"Object()"}, value.chain.context.Path) |
| 270 | assert.Equal(t, []string{"bar"}, value.chain.context.AliasedPath) |
| 271 | |
| 272 | childValue := value.Values() |
| 273 | assert.Equal(t, []string{"Object()", "Values()"}, childValue.chain.context.Path) |
| 274 | assert.Equal(t, []string{"bar", "Values()"}, childValue.chain.context.AliasedPath) |
| 275 | } |
| 276 | |
| 277 | func TestObject_Path(t *testing.T) { |
| 278 | reporter := newMockReporter(t) |
nothing calls this directly
no test coverage detected
searching dependent graphs…