MCPcopy
hub / github.com/grafana/dskit / checkTreeEqual

Function checkTreeEqual

loser/loser_test.go:16–25  ·  view source on GitHub ↗
(t *testing.T, tree *loser.Tree[E], expected []E, msg ...interface{})

Source from the content-addressed store, hash-verified

14)
15
16func checkTreeEqual[E cmp.Ordered](t *testing.T, tree *loser.Tree[E], expected []E, msg ...interface{}) {
17 t.Helper()
18 actual := []E{}
19
20 for tree.Next() {
21 actual = append(actual, tree.Winner())
22 }
23
24 require.Equal(t, expected, actual, msg...)
25}
26
27var testCases = []struct {
28 name string

Callers 3

TestMergeFunction · 0.85
FuzzMergeFunction · 0.85
TestPushFunction · 0.85

Calls 4

HelperMethod · 0.80
WinnerMethod · 0.80
NextMethod · 0.65
EqualMethod · 0.45

Tested by

no test coverage detected