Home / Function/ TestNoMethodWithGlobalHandlers() — gin Function Reference

TestNoMethodWithGlobalHandlers() — gin Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  00385f3c_962e_a0a9_c8c0_43f785280444["TestNoMethodWithGlobalHandlers()"]
  5d6e7276_feeb_b8e2_30e8_0ae0827740a5["gin_test.go"]
  00385f3c_962e_a0a9_c8c0_43f785280444 -->|defined in| 5d6e7276_feeb_b8e2_30e8_0ae0827740a5
  a423cae4_a5e4_5096_1105_5638627a5c35["compareFunc()"]
  00385f3c_962e_a0a9_c8c0_43f785280444 -->|calls| a423cae4_a5e4_5096_1105_5638627a5c35
  style 00385f3c_962e_a0a9_c8c0_43f785280444 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

gin_test.go lines 573–602

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

	router := New()
	router.Use(middleware2)

	router.NoMethod(middleware0)
	assert.Len(t, router.allNoMethod, 2)
	assert.Len(t, router.Handlers, 1)
	assert.Len(t, router.noMethod, 1)

	compareFunc(t, router.Handlers[0], middleware2)
	compareFunc(t, router.noMethod[0], middleware0)
	compareFunc(t, router.allNoMethod[0], middleware2)
	compareFunc(t, router.allNoMethod[1], middleware0)

	router.Use(middleware1)
	assert.Len(t, router.allNoMethod, 3)
	assert.Len(t, router.Handlers, 2)
	assert.Len(t, router.noMethod, 1)

	compareFunc(t, router.Handlers[0], middleware2)
	compareFunc(t, router.Handlers[1], middleware1)
	compareFunc(t, router.noMethod[0], middleware0)
	compareFunc(t, router.allNoMethod[0], middleware2)
	compareFunc(t, router.allNoMethod[1], middleware1)
	compareFunc(t, router.allNoMethod[2], middleware0)
}

Domain

Subdomains

Defined In

Frequently Asked Questions

What does TestNoMethodWithGlobalHandlers() do?
TestNoMethodWithGlobalHandlers() is a function in the gin codebase, defined in gin_test.go.
Where is TestNoMethodWithGlobalHandlers() defined?
TestNoMethodWithGlobalHandlers() is defined in gin_test.go at line 573.
What does TestNoMethodWithGlobalHandlers() call?
TestNoMethodWithGlobalHandlers() 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