Skip to content
Myr

remove debug print statements from test code (#1540)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Found using https://go-critic.github.io/overview#commentedOutCode-ref

authored by Iskander (Alex) Sharipov · committed by 田欧 · parent 500ebd9 · Browse files · 1 file+0 added−11 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+0 added−11 removed

  • other:+0 added−11 removed

1 file+0 added−11 removed

modified:tree_test.go-11 removed
123 unmodified lines
124 for _, route := range routes {125 tree.addRoute(route, fakeHandler(route))126 }127128 //printChildren(tree, "")129128 checkRequests(t, tree, testRequests{129 {"/a", false, "/a", nil},130 {"/", true, "", nil},131 {"/hi", false, "/hi", nil},
33 unmodified lines
165 for _, route := range routes {166 tree.addRoute(route, fakeHandler(route))167 }168171 //printChildren(tree, "")172169 checkRequests(t, tree, testRequests{170 {"/", false, "/", nil},171 {"/cmd/test/", false, "/cmd/:tool/", Params{Param{"tool", "test"}}},172 {"/cmd/test", true, "", Params{Param{"tool", "test"}}},
30 unmodified lines
203 for _, route := range routes {204 tree.addRoute(route, fakeHandler(route))205 }206211 //printChildren(tree, "")207 unescape := true208 checkRequests(t, tree, testRequests{209 {"/", false, "/", nil},210 {"/cmd/test/", false, "/cmd/:tool/", Params{Param{"tool", "test"}}},
43 unmodified lines
254 } else if recv != nil {255 t.Errorf("unexpected panic for route '%s': %v", route.path, recv)256 }257 }263264 //printChildren(tree, "")258}259260func TestTreeWildcardConflict(t *testing.T) {261 routes := []testRoute{
58 unmodified lines
320 t.Fatalf("no panic while inserting duplicate route '%s", route)321 }322 }323331 //printChildren(tree, "")332324 checkRequests(t, tree, testRequests{325 {"/", false, "/", nil},326 {"/doc/", false, "/doc/", nil},327 {"/src/some/file.png", false, "/src/*filepath", Params{Param{"filepath", "/some/file.png"}}},
106 unmodified lines
434 t.Fatalf("panic inserting route '%s': %v", route, recv)435 }436 }437447 //printChildren(tree, "")448438 tsrRoutes := [...]string{439 "/hi/",440 "/b",441 "/search/gopher/",
214 unmodified lines