]> Cypherpunks repositories - gostls13.git/commitdiff
path: fix up bizarre test
authorRob Pike <r@golang.org>
Wed, 16 Mar 2016 02:28:32 +0000 (13:28 +1100)
committerRob Pike <r@golang.org>
Wed, 16 Mar 2016 03:59:03 +0000 (03:59 +0000)
The Join test was doing something remarkable and unnecessary instead of
just using ... on a slice. Maybe it was an editing relic.

Fix it by deleting the monstrosity.

Change-Id: I5b90c6d539d334a9c27e57d26dacd831721cfcfe
Reviewed-on: https://go-review.googlesource.com/20727
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/path/path_test.go

index 13b585223f834216410fa8d78962421346c944ab..85b2450a620246f3290ac1051abae74fddacc0fd 100644 (file)
@@ -135,15 +135,9 @@ var jointests = []JoinTest{
        {[]string{"", ""}, ""},
 }
 
-// join takes a []string and passes it to Join.
-func join(elem []string, args ...string) string {
-       args = elem
-       return Join(args...)
-}
-
 func TestJoin(t *testing.T) {
        for _, test := range jointests {
-               if p := join(test.elem); p != test.path {
+               if p := Join(test.elem...); p != test.path {
                        t.Errorf("join(%q) = %q, want %q", test.elem, p, test.path)
                }
        }