func newTestValueStore() *ValueStore {
	ts := &chunks.TestStorage{}
	return NewValueStore(ts.NewView())
}
newTestValueStore creates a simple struct that satisfies ValueReadWriter
and is backed by a chunks.TestStore.
package types
import (
	"sync"
	"github.com/attic-labs/noms/go/chunks"
	"github.com/attic-labs/noms/go/constants"
	"github.com/attic-labs/noms/go/d"
	"github.com/attic-labs/noms/go/hash"
	"github.com/attic-labs/noms/go/util/sizecache"
)
type ValueReader interface {
	ReadValue(h hash.Hash) Value
	ReadManyValues(hashes hash.HashSlice) ValueSlice
}
type ValueWriter interface {
	WriteValue(v Value) Ref
}
type ValueReadWriter interface {
	ValueReader
	ValueWriter
}
type ValueStore struct {
	cs                   chunks.ChunkStore
	bufferMu             sync.RWMutex
	bufferedChunks       map[hash.Hash]chunks.Chunk
	bufferedChunksMax    uint64
	bufferedChunkSize    uint64
	withBufferedChildren map[hash.Hash]uint64  
	unresolvedRefs       hash.HashSet
	enforceCompleteness  bool
	decodedChunks        *sizecache.SizeCache
	versOnce sync.Once
}
func PanicIfDangling(unresolved hash.HashSet, cs chunks.ChunkStore) {
	absent := cs.HasMany(unresolved)
	if len(absent) != 0 {
		d.Panic("Found dangling references to %v", absent)
	}
}
const (
	defaultDecodedChunksSize = 1 << 25  
	defaultPendingPutMax     = 1 << 28  
)