remove debug print statements from test code (#1540)

Found using https://go-critic.github.io/overview#commentedOutCode-ref
This commit is contained in:
Iskander (Alex) Sharipov 2018-09-12 02:13:16 +01:00 committed by 田欧
parent 500ebd9ea8
commit df1e17c2f0

View File

@ -125,8 +125,6 @@ func TestTreeAddAndGet(t *testing.T) {
tree.addRoute(route, fakeHandler(route)) tree.addRoute(route, fakeHandler(route))
} }
//printChildren(tree, "")
checkRequests(t, tree, testRequests{ checkRequests(t, tree, testRequests{
{"/a", false, "/a", nil}, {"/a", false, "/a", nil},
{"/", true, "", nil}, {"/", true, "", nil},
@ -168,8 +166,6 @@ func TestTreeWildcard(t *testing.T) {
tree.addRoute(route, fakeHandler(route)) tree.addRoute(route, fakeHandler(route))
} }
//printChildren(tree, "")
checkRequests(t, tree, testRequests{ checkRequests(t, tree, testRequests{
{"/", false, "/", nil}, {"/", false, "/", nil},
{"/cmd/test/", false, "/cmd/:tool/", Params{Param{"tool", "test"}}}, {"/cmd/test/", false, "/cmd/:tool/", Params{Param{"tool", "test"}}},
@ -208,7 +204,6 @@ func TestUnescapeParameters(t *testing.T) {
tree.addRoute(route, fakeHandler(route)) tree.addRoute(route, fakeHandler(route))
} }
//printChildren(tree, "")
unescape := true unescape := true
checkRequests(t, tree, testRequests{ checkRequests(t, tree, testRequests{
{"/", false, "/", nil}, {"/", false, "/", nil},
@ -260,8 +255,6 @@ func testRoutes(t *testing.T, routes []testRoute) {
t.Errorf("unexpected panic for route '%s': %v", route.path, recv) t.Errorf("unexpected panic for route '%s': %v", route.path, recv)
} }
} }
//printChildren(tree, "")
} }
func TestTreeWildcardConflict(t *testing.T) { func TestTreeWildcardConflict(t *testing.T) {
@ -328,8 +321,6 @@ func TestTreeDupliatePath(t *testing.T) {
} }
} }
//printChildren(tree, "")
checkRequests(t, tree, testRequests{ checkRequests(t, tree, testRequests{
{"/", false, "/", nil}, {"/", false, "/", nil},
{"/doc/", false, "/doc/", nil}, {"/doc/", false, "/doc/", nil},
@ -444,8 +435,6 @@ func TestTreeTrailingSlashRedirect(t *testing.T) {
} }
} }
//printChildren(tree, "")
tsrRoutes := [...]string{ tsrRoutes := [...]string{
"/hi/", "/hi/",
"/b", "/b",