MCPcopy Create free account
hub / github.com/google/gapid / TestPoolSliceReaderErrorPropagation

Function TestPoolSliceReaderErrorPropagation

gapis/memory/pool_test.go:211–220  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

209}
210
211func TestPoolSliceReaderErrorPropagation(t *testing.T) {
212 ctx := log.Testing(t)
213 ctx = database.Put(ctx, database.NewInMemory(ctx))
214 p := Pool{}
215 p.Write(2, Resource(id.ID{}, 5))
216
217 got, err := readFully(p.Slice(Range{Base: 0, Size: 10}).NewReader(ctx), 512)
218 assert.For(ctx, "len").That(len(got)).Equals(2)
219 assert.For(ctx, "err").ThatError(err).Failed()
220}
221
222// Write layout:
223// innerPool:

Callers

nothing calls this directly

Calls 11

WriteMethod · 0.95
SliceMethod · 0.95
readFullyFunction · 0.85
ThatMethod · 0.80
ForMethod · 0.80
FailedMethod · 0.80
ThatErrorMethod · 0.80
ResourceFunction · 0.70
NewReaderMethod · 0.65
EqualsMethod · 0.65
PutMethod · 0.45

Tested by

no test coverage detected