MCPcopy
hub / github.com/rclone/rclone / TestLevelWrite

Function TestLevelWrite

backend/hidrive/hidrivehash/hidrivehash_test.go:204–214  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

202}
203
204func TestLevelWrite(t *testing.T) {
205 for _, test := range testTableLevel {
206 l := hidrivehash.NewLevel()
207 t.Run(test.name, func(t *testing.T) {
208 for i := range test.ins {
209 l.Write(test.ins[i])
210 assert.Equal(t, test.outs[i], l.Sum(nil))
211 }
212 })
213 }
214}
215
216func TestLevelIsFull(t *testing.T) {
217 content := [hidrivehash.Size]byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19}

Callers

nothing calls this directly

Calls 5

NewLevelFunction · 0.92
RunMethod · 0.65
WriteMethod · 0.65
EqualMethod · 0.45
SumMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…