MCPcopy Index your code
hub / github.com/go-git/go-git / TestObjectUpdateOverflow

Method TestObjectUpdateOverflow

plumbing/cache/object_test.go:156–167  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

154}
155
156func (s *ObjectSuite) TestObjectUpdateOverflow(c *C) {
157 o := NewObjectLRU(9 * Byte)
158
159 a1 := newObject(s.aObject.Hash().String(), 9*Byte)
160 a2 := newObject(s.aObject.Hash().String(), 1*Byte)
161 b := newObject(s.bObject.Hash().String(), 1*Byte)
162
163 o.Put(a1)
164 a1.SetSize(-5)
165 o.Put(a2)
166 o.Put(b)
167}
168
169type dummyObject struct {
170 hash plumbing.Hash

Callers

nothing calls this directly

Calls 6

PutMethod · 0.95
NewObjectLRUFunction · 0.85
newObjectFunction · 0.70
StringMethod · 0.65
HashMethod · 0.65
SetSizeMethod · 0.65

Tested by

no test coverage detected