TestTreeAddAndGet() — gin Function Reference
Architecture documentation for the TestTreeAddAndGet() function in tree_test.go from the gin codebase.
Entity Profile
Dependency Diagram
graph TD aa254bda_b8d1_b709_bc93_33aa96dd90b9["TestTreeAddAndGet()"] 6dab8d3e_0986_1500_b06f_6323ea7ce91a["fakeHandler()"] aa254bda_b8d1_b709_bc93_33aa96dd90b9 -->|calls| 6dab8d3e_0986_1500_b06f_6323ea7ce91a 4c07e1ac_0102_9e6b_694c_072ecd891dad["checkRequests()"] aa254bda_b8d1_b709_bc93_33aa96dd90b9 -->|calls| 4c07e1ac_0102_9e6b_694c_072ecd891dad f6753205_2ff0_1d6d_ec58_954c26acae9b["checkPriorities()"] aa254bda_b8d1_b709_bc93_33aa96dd90b9 -->|calls| f6753205_2ff0_1d6d_ec58_954c26acae9b style aa254bda_b8d1_b709_bc93_33aa96dd90b9 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tree_test.go lines 101–136
func TestTreeAddAndGet(t *testing.T) {
tree := &node{}
routes := [...]string{
"/hi",
"/contact",
"/co",
"/c",
"/a",
"/ab",
"/doc/",
"/doc/go_faq.html",
"/doc/go1.html",
"/α",
"/β",
}
for _, route := range routes {
tree.addRoute(route, fakeHandler(route))
}
checkRequests(t, tree, testRequests{
{"/a", false, "/a", nil},
{"/", true, "", nil},
{"/hi", false, "/hi", nil},
{"/contact", false, "/contact", nil},
{"/co", false, "/co", nil},
{"/con", true, "", nil}, // key mismatch
{"/cona", true, "", nil}, // key mismatch
{"/no", true, "", nil}, // no matching child
{"/ab", false, "/ab", nil},
{"/α", false, "/α", nil},
{"/β", false, "/β", nil},
})
checkPriorities(t, tree)
}
Domain
Subdomains
Source
Frequently Asked Questions
What does TestTreeAddAndGet() do?
TestTreeAddAndGet() is a function in the gin codebase.
What does TestTreeAddAndGet() call?
TestTreeAddAndGet() calls 3 function(s): checkPriorities, checkRequests, fakeHandler.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free