Home / Function/ TestTreeInvalidEscape() — gin Function Reference

TestTreeInvalidEscape() — gin Function Reference

Architecture documentation for the TestTreeInvalidEscape() function in tree_test.go from the gin codebase.

Entity Profile

Dependency Diagram

graph TD
  1a8a69c1_000a_e2df_731d_2e181334dcdb["TestTreeInvalidEscape()"]
  7d17d111_6d55_8539_e0ed_b32eea9e5ef6["catchPanic()"]
  1a8a69c1_000a_e2df_731d_2e181334dcdb -->|calls| 7d17d111_6d55_8539_e0ed_b32eea9e5ef6
  6dab8d3e_0986_1500_b06f_6323ea7ce91a["fakeHandler()"]
  1a8a69c1_000a_e2df_731d_2e181334dcdb -->|calls| 6dab8d3e_0986_1500_b06f_6323ea7ce91a
  style 1a8a69c1_000a_e2df_731d_2e181334dcdb fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tree_test.go lines 980–995

func TestTreeInvalidEscape(t *testing.T) {
	routes := map[string]bool{
		"/r1/r":    true,
		"/r2/:r":   true,
		"/r3/\\:r": true,
	}
	tree := &node{}
	for route, valid := range routes {
		recv := catchPanic(func() {
			tree.addRoute(route, fakeHandler(route))
		})
		if recv == nil != valid {
			t.Fatalf("%s should be %t but got %v", route, valid, recv)
		}
	}
}

Domain

Subdomains

Frequently Asked Questions

What does TestTreeInvalidEscape() do?
TestTreeInvalidEscape() is a function in the gin codebase.
What does TestTreeInvalidEscape() call?
TestTreeInvalidEscape() calls 2 function(s): catchPanic, fakeHandler.

Analyze Your Own Codebase

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

Try Supermodel Free