MCPcopy
hub / github.com/julienschmidt/httprouter / checkPriorities

Function checkPriorities

tree_test.go:65–83  ·  view source on GitHub ↗
(t *testing.T, n *node)

Source from the content-addressed store, hash-verified

63}
64
65func checkPriorities(t *testing.T, n *node) uint32 {
66 var prio uint32
67 for i := range n.children {
68 prio += checkPriorities(t, n.children[i])
69 }
70
71 if n.handle != nil {
72 prio++
73 }
74
75 if n.priority != prio {
76 t.Errorf(
77 "priority mismatch for node '%s': is %d, should be %d",
78 n.path, n.priority, prio,
79 )
80 }
81
82 return prio
83}
84
85func checkMaxParams(t *testing.T, n *node) uint8 {
86 var maxParams uint8

Callers 2

TestTreeAddAndGetFunction · 0.85
TestTreeWildcardFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected