Example #1
0
func assertPathResolvesTo(assert *assert.Assertions, expect, ref Value, p Path) {
	if expect == nil {
		assert.Nil(p.Resolve(ref))
		return
	}

	assert.True(expect.Equals(p.Resolve(ref)))
}
Example #2
0
func assertPathResolvesTo(assert *assert.Assertions, expect, ref Value, p Path) {
	actual := p.Resolve(ref)
	if expect == nil {
		assert.Nil(actual)
	} else if actual == nil {
		assert.Fail("", "Expected %s, but got nil", EncodedValue(expect))
	} else {
		assert.True(expect.Equals(actual), "Expected %s, but got %s", EncodedValue(expect), EncodedValue(actual))
	}
}