@@ -13,15 +13,15 @@ import (
13
13
"testing"
14
14
)
15
15
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
+ // }
25
25
26
26
// Used as a workaround since we can't compare functions or their addresses
27
27
var fakeHandlerValue string
@@ -121,7 +121,7 @@ func TestTreeAddAndGet(t *testing.T) {
121
121
tree .addRoute (route , fakeHandler (route ))
122
122
}
123
123
124
- //printChildren(tree, "")
124
+ // printChildren(tree, "")
125
125
126
126
checkRequests (t , tree , testRequests {
127
127
{"/a" , false , "/a" , nil },
@@ -163,7 +163,7 @@ func TestTreeWildcard(t *testing.T) {
163
163
tree .addRoute (route , fakeHandler (route ))
164
164
}
165
165
166
- //printChildren(tree, "")
166
+ // printChildren(tree, "")
167
167
168
168
checkRequests (t , tree , testRequests {
169
169
{"/" , false , "/" , nil },
@@ -217,7 +217,7 @@ func testRoutes(t *testing.T, routes []testRoute) {
217
217
}
218
218
}
219
219
220
- //printChildren(tree, "")
220
+ // printChildren(tree, "")
221
221
}
222
222
223
223
func TestTreeWildcardConflict (t * testing.T ) {
@@ -285,7 +285,7 @@ func TestTreeDupliatePath(t *testing.T) {
285
285
}
286
286
}
287
287
288
- //printChildren(tree, "")
288
+ // printChildren(tree, "")
289
289
290
290
checkRequests (t , tree , testRequests {
291
291
{"/" , false , "/" , nil },
@@ -363,17 +363,6 @@ func TestTreeDoubleWildcard(t *testing.T) {
363
363
}
364
364
}
365
365
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
-
377
366
func TestTreeTrailingSlashRedirect (t * testing.T ) {
378
367
tree := & node {}
379
368
@@ -413,7 +402,7 @@ func TestTreeTrailingSlashRedirect(t *testing.T) {
413
402
}
414
403
}
415
404
416
- //printChildren(tree, "")
405
+ // printChildren(tree, "")
417
406
418
407
tsrRoutes := [... ]string {
419
408
"/hi/" ,
0 commit comments