(t *testing.T, n *node)
| 70 | } |
| 71 | |
| 72 | func checkPriorities(t *testing.T, n *node) uint32 { |
| 73 | var prio uint32 |
| 74 | for i := range n.children { |
| 75 | prio += checkPriorities(t, n.children[i]) |
| 76 | } |
| 77 | |
| 78 | if n.handlers != nil { |
| 79 | prio++ |
| 80 | } |
| 81 | |
| 82 | if n.priority != prio { |
| 83 | t.Errorf( |
| 84 | "priority mismatch for node '%s': is %d, should be %d", |
| 85 | n.path, n.priority, prio, |
| 86 | ) |
| 87 | } |
| 88 | |
| 89 | return prio |
| 90 | } |
| 91 | |
| 92 | func TestCountParams(t *testing.T) { |
| 93 | if countParams("/path/:param1/static/*catch-all") != 2 { |
no outgoing calls
no test coverage detected