aboutsummaryrefslogtreecommitdiff
path: root/src/os
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2025-07-25 13:02:01 +0200
committerGopher Robot <gobot@golang.org>2025-08-11 08:13:16 -0700
commita2431776ebc57ebc385d3fd9d3cc6eb89acb9d9c (patch)
treeab5dfc3d560f01a14b7c824e05e45d7531e64479 /src/os
parenta7f05b38f7e7beefd5ee54089aae59b21507bb3c (diff)
downloadgo-a2431776ebc57ebc385d3fd9d3cc6eb89acb9d9c.tar.xz
net, os, file/filepath, syscall: use slices.Equal in tests
Use slices.Equal to compare slices instead of strings.Join and then comparing strings. Change-Id: Ib916002b7357bd7f4e66b853dd7af8d98eba5549 Reviewed-on: https://go-review.googlesource.com/c/go/+/690475 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
Diffstat (limited to 'src/os')
-rw-r--r--src/os/os_windows_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/os/os_windows_test.go b/src/os/os_windows_test.go
index 515d1c1359..5a479051ee 100644
--- a/src/os/os_windows_test.go
+++ b/src/os/os_windows_test.go
@@ -663,7 +663,7 @@ func TestOpenVolumeName(t *testing.T) {
}
slices.Sort(have)
- if strings.Join(want, "/") != strings.Join(have, "/") {
+ if !slices.Equal(want, have) {
t.Fatalf("unexpected file list %q, want %q", have, want)
}
}