@@ -525,8 +525,8 @@ func TestTreeFindCaseInsensitivePath(t *testing.T) {
525
525
out , found := tree .findCaseInsensitivePath (route , true )
526
526
if ! found {
527
527
t .Errorf ("Route '%s' not found!" , route )
528
- } else if string ( out ) != route {
529
- t .Errorf ("Wrong result for route '%s': %s" , route , string ( out ) )
528
+ } else if out != route {
529
+ t .Errorf ("Wrong result for route '%s': %s" , route , out )
530
530
}
531
531
}
532
532
// With fixTrailingSlash = false
@@ -535,8 +535,8 @@ func TestTreeFindCaseInsensitivePath(t *testing.T) {
535
535
out , found := tree .findCaseInsensitivePath (route , false )
536
536
if ! found {
537
537
t .Errorf ("Route '%s' not found!" , route )
538
- } else if string ( out ) != route {
539
- t .Errorf ("Wrong result for route '%s': %s" , route , string ( out ) )
538
+ } else if out != route {
539
+ t .Errorf ("Wrong result for route '%s': %s" , route , out )
540
540
}
541
541
}
542
542
@@ -606,9 +606,9 @@ func TestTreeFindCaseInsensitivePath(t *testing.T) {
606
606
// With fixTrailingSlash = true
607
607
for _ , test := range tests {
608
608
out , found := tree .findCaseInsensitivePath (test .in , true )
609
- if found != test .found || (found && (string ( out ) != test .out )) {
609
+ if found != test .found || (found && (out != test .out )) {
610
610
t .Errorf ("Wrong result for '%s': got %s, %t; want %s, %t" ,
611
- test .in , string ( out ) , found , test .out , test .found )
611
+ test .in , out , found , test .out , test .found )
612
612
return
613
613
}
614
614
}
@@ -617,12 +617,12 @@ func TestTreeFindCaseInsensitivePath(t *testing.T) {
617
617
out , found := tree .findCaseInsensitivePath (test .in , false )
618
618
if test .slash {
619
619
if found { // test needs a trailingSlash fix. It must not be found!
620
- t .Errorf ("Found without fixTrailingSlash: %s; got %s" , test .in , string ( out ) )
620
+ t .Errorf ("Found without fixTrailingSlash: %s; got %s" , test .in , out )
621
621
}
622
622
} else {
623
- if found != test .found || (found && (string ( out ) != test .out )) {
623
+ if found != test .found || (found && (out != test .out )) {
624
624
t .Errorf ("Wrong result for '%s': got %s, %t; want %s, %t" ,
625
- test .in , string ( out ) , found , test .out , test .found )
625
+ test .in , out , found , test .out , test .found )
626
626
return
627
627
}
628
628
}
0 commit comments