Skip to content

Commit 98f8ba3

Browse files
committed
tree_test: remove dead code
1 parent ca14a4f commit 98f8ba3

File tree

1 file changed

+14
-25
lines changed

1 file changed

+14
-25
lines changed

tree_test.go

Lines changed: 14 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ import (
1313
"testing"
1414
)
1515

16-
func printChildren(n *node, prefix string) {
17-
fmt.Printf(" %02d %s%s[%d] %v %t %d \r\n", n.priority, prefix, n.path, len(n.children), n.handle, n.wildChild, n.nType)
18-
for l := len(n.path); l > 0; l-- {
19-
prefix += " "
20-
}
21-
for _, child := range n.children {
22-
printChildren(child, prefix)
23-
}
24-
}
16+
// func printChildren(n *node, prefix string) {
17+
// fmt.Printf(" %02d %s%s[%d] %v %t %d \r\n", n.priority, prefix, n.path, len(n.children), n.handle, n.wildChild, n.nType)
18+
// for l := len(n.path); l > 0; l-- {
19+
// prefix += " "
20+
// }
21+
// for _, child := range n.children {
22+
// printChildren(child, prefix)
23+
// }
24+
// }
2525

2626
// Used as a workaround since we can't compare functions or their addresses
2727
var fakeHandlerValue string
@@ -121,7 +121,7 @@ func TestTreeAddAndGet(t *testing.T) {
121121
tree.addRoute(route, fakeHandler(route))
122122
}
123123

124-
//printChildren(tree, "")
124+
// printChildren(tree, "")
125125

126126
checkRequests(t, tree, testRequests{
127127
{"/a", false, "/a", nil},
@@ -163,7 +163,7 @@ func TestTreeWildcard(t *testing.T) {
163163
tree.addRoute(route, fakeHandler(route))
164164
}
165165

166-
//printChildren(tree, "")
166+
// printChildren(tree, "")
167167

168168
checkRequests(t, tree, testRequests{
169169
{"/", false, "/", nil},
@@ -217,7 +217,7 @@ func testRoutes(t *testing.T, routes []testRoute) {
217217
}
218218
}
219219

220-
//printChildren(tree, "")
220+
// printChildren(tree, "")
221221
}
222222

223223
func TestTreeWildcardConflict(t *testing.T) {
@@ -285,7 +285,7 @@ func TestTreeDupliatePath(t *testing.T) {
285285
}
286286
}
287287

288-
//printChildren(tree, "")
288+
// printChildren(tree, "")
289289

290290
checkRequests(t, tree, testRequests{
291291
{"/", false, "/", nil},
@@ -363,17 +363,6 @@ func TestTreeDoubleWildcard(t *testing.T) {
363363
}
364364
}
365365

366-
/*func TestTreeDuplicateWildcard(t *testing.T) {
367-
tree := &node{}
368-
369-
routes := [...]string{
370-
"/:id/:name/:id",
371-
}
372-
for _, route := range routes {
373-
...
374-
}
375-
}*/
376-
377366
func TestTreeTrailingSlashRedirect(t *testing.T) {
378367
tree := &node{}
379368

@@ -413,7 +402,7 @@ func TestTreeTrailingSlashRedirect(t *testing.T) {
413402
}
414403
}
415404

416-
//printChildren(tree, "")
405+
// printChildren(tree, "")
417406

418407
tsrRoutes := [...]string{
419408
"/hi/",

0 commit comments

Comments
 (0)