Home / Function/ TestNoMethodWithoutGlobalHandlers() — gin Function Reference

TestNoMethodWithoutGlobalHandlers() — gin Function Reference

Architecture documentation for the TestNoMethodWithoutGlobalHandlers() function in gin_test.go from the gin codebase.

Entity Profile

Dependency Diagram

graph TD
  61cac214_37e4_613d_e460_55f26d33546f["TestNoMethodWithoutGlobalHandlers()"]
  8319344f_51a7_0885_fb3d_affd8c633546["compareFunc()"]
  61cac214_37e4_613d_e460_55f26d33546f -->|calls| 8319344f_51a7_0885_fb3d_affd8c633546
  style 61cac214_37e4_613d_e460_55f26d33546f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

gin_test.go lines 525–545

func TestNoMethodWithoutGlobalHandlers(t *testing.T) {
	var middleware0 HandlerFunc = func(c *Context) {}
	var middleware1 HandlerFunc = func(c *Context) {}

	router := New()

	router.NoMethod(middleware0)
	assert.Empty(t, router.Handlers)
	assert.Len(t, router.noMethod, 1)
	assert.Len(t, router.allNoMethod, 1)
	compareFunc(t, router.noMethod[0], middleware0)
	compareFunc(t, router.allNoMethod[0], middleware0)

	router.NoMethod(middleware1, middleware0)
	assert.Len(t, router.noMethod, 2)
	assert.Len(t, router.allNoMethod, 2)
	compareFunc(t, router.noMethod[0], middleware1)
	compareFunc(t, router.allNoMethod[0], middleware1)
	compareFunc(t, router.noMethod[1], middleware0)
	compareFunc(t, router.allNoMethod[1], middleware0)
}

Domain

Subdomains

Frequently Asked Questions

What does TestNoMethodWithoutGlobalHandlers() do?
TestNoMethodWithoutGlobalHandlers() is a function in the gin codebase.
What does TestNoMethodWithoutGlobalHandlers() call?
TestNoMethodWithoutGlobalHandlers() calls 1 function(s): compareFunc.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free