Skip to content

Commit 55567d3

Browse files
committed
path: fix up bizarre test
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 <[email protected]> Run-TryBot: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
1 parent cf08ead commit 55567d3

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/path/path_test.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -135,15 +135,9 @@ var jointests = []JoinTest{
135135
{[]string{"", ""}, ""},
136136
}
137137

138-
// join takes a []string and passes it to Join.
139-
func join(elem []string, args ...string) string {
140-
args = elem
141-
return Join(args...)
142-
}
143-
144138
func TestJoin(t *testing.T) {
145139
for _, test := range jointests {
146-
if p := join(test.elem); p != test.path {
140+
if p := Join(test.elem...); p != test.path {
147141
t.Errorf("join(%q) = %q, want %q", test.elem, p, test.path)
148142
}
149143
}

0 commit comments

Comments
 (0)