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))) }
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)) } }
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()) }