mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-16 13:22:09 +08:00
add working test
This commit is contained in:
parent
57ede9c95a
commit
37a79bff73
@ -192,6 +192,7 @@ func TestTreeWildcard(t *testing.T) {
|
||||
"/get/abc/123abg/:param",
|
||||
"/get/abc/123abf/:param",
|
||||
"/get/abc/123abfff/:param",
|
||||
"/get/address/:address",
|
||||
}
|
||||
for _, route := range routes {
|
||||
tree.addRoute(route, fakeHandler(route))
|
||||
@ -315,6 +316,7 @@ func TestTreeWildcard(t *testing.T) {
|
||||
{"/get/abc/123abg/test", false, "/get/abc/123abg/:param", Params{Param{Key: "param", Value: "test"}}},
|
||||
{"/get/abc/123abf/testss", false, "/get/abc/123abf/:param", Params{Param{Key: "param", Value: "testss"}}},
|
||||
{"/get/abc/123abfff/te", false, "/get/abc/123abfff/:param", Params{Param{Key: "param", Value: "te"}}},
|
||||
{"/get/address/B", false, "/get/address/:address", Params{{Key: "address", Value: "B"}}},
|
||||
})
|
||||
|
||||
checkPriorities(t, tree)
|
||||
|
Loading…
x
Reference in New Issue
Block a user