(t *testing.T, c *Context, expectParam map[string]string)
| 657 | ) |
| 658 | |
| 659 | func checkUnusedParamValues(t *testing.T, c *Context, expectParam map[string]string) { |
| 660 | for _, p := range c.PathValues() { |
| 661 | value := p.Value |
| 662 | if value != "" { |
| 663 | if expectParam == nil { |
| 664 | t.Errorf("pValue '%v' is set for param name '%v' but we are not expecting it with expectParam", value, p) |
| 665 | } else { |
| 666 | if _, ok := expectParam[p.Name]; !ok { |
| 667 | t.Errorf("pValue '%v' is set for param name '%v' but we are not expecting it with expectParam", value, p) |
| 668 | } |
| 669 | } |
| 670 | } |
| 671 | } |
| 672 | } |
| 673 | |
| 674 | func TestRouterFillsRequestPatternField(t *testing.T) { |
| 675 | path := "/folders/a/files/echo.gif" |
no test coverage detected
searching dependent graphs…