(t *testing.T)
| 696 | } |
| 697 | |
| 698 | func TestContextHandlerNames(t *testing.T) { |
| 699 | c, _ := CreateTestContext(httptest.NewRecorder()) |
| 700 | c.handlers = HandlersChain{func(c *Context) {}, nil, handlerNameTest, func(c *Context) {}, handlerNameTest2} |
| 701 | |
| 702 | names := c.HandlerNames() |
| 703 | |
| 704 | assert.Len(t, names, 4) |
| 705 | for _, name := range names { |
| 706 | assert.Regexp(t, `^(.*/vendor/)?(github\.com/gin-gonic/gin\.){1}(TestContextHandlerNames\.func.*){0,1}(handlerNameTest.*){0,1}`, name) |
| 707 | } |
| 708 | } |
| 709 | |
| 710 | func handlerNameTest(c *Context) { |
| 711 | } |
nothing calls this directly
no test coverage detected