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

Function TestCountParams

tree_test.go:107–114  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

105}
106
107func TestCountParams(t *testing.T) {
108 if countParams("/path/:param1/static/*catch-all") != 2 {
109 t.Fail()
110 }
111 if countParams(strings.Repeat("/:param", 256)) != 255 {
112 t.Fail()
113 }
114}
115
116func TestTreeAddAndGet(t *testing.T) {
117 tree := &node{}

Callers

nothing calls this directly

Calls 1

countParamsFunction · 0.85

Tested by

no test coverage detected