func serializeChunks(chnx []chunks.Chunk, assert *assert.Assertions) io.Reader { body := &bytes.Buffer{} gw := snappy.NewBufferedWriter(body) sz := chunks.NewSerializer(gw) assert.NoError(sz.PutMany(chnx)) assert.NoError(sz.Close()) assert.NoError(gw.Close()) return body }
func serializeChunks(chnx []chunks.Chunk, assert *assert.Assertions) io.Reader { body := &bytes.Buffer{} sw := snappy.NewBufferedWriter(body) for _, chunk := range chnx { chunks.Serialize(chunk, sw) } assert.NoError(sw.Close()) return body }
func assertPathStringResolvesTo(assert *assert.Assertions, expect, ref Value, str string) { p, err := NewPath().AddPath(str) assert.NoError(err) assertPathResolvesTo(assert, expect, ref, p) }