示例#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)))
}
示例#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))
	}
}
示例#3
0
func assertInputNotInStore(input string, h hash.Hash, s ChunkStore, assert *assert.Assertions) {
	data := s.Get(h)
	assert.Nil(data, "Shouldn't have gotten data for %s", h.String())
}