aboutsummaryrefslogtreecommitdiff
path: root/src/path/filepath/path_windows_test.go
diff options
context:
space:
mode:
authorapocelipes <seve3r@outlook.com>2024-07-24 10:47:14 +0000
committerGopher Robot <gobot@golang.org>2024-07-25 00:23:06 +0000
commit05861ff90cfc855620d0dcbd1d6cc488ebf04880 (patch)
tree72b56bbb48da1f66041fd9df85423740bb3f5120 /src/path/filepath/path_windows_test.go
parent0b0dfcd5404ce86d6c818d78bdb6348ded459e96 (diff)
downloadgo-05861ff90cfc855620d0dcbd1d6cc488ebf04880.tar.xz
os,path/filepath,testing: use slices to clean up tests
Replace reflect.DeepEqual with slices.Equal which is much faster. Change-Id: I299db6f998738174983731f08c1021346b87dfaa GitHub-Last-Rev: 44ca9015d6af4e0fbe8d23c93b3f2da08a2d7728 GitHub-Pull-Request: golang/go#67613 Reviewed-on: https://go-review.googlesource.com/c/go/+/587938 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src/path/filepath/path_windows_test.go')
-rw-r--r--src/path/filepath/path_windows_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/path/filepath/path_windows_test.go b/src/path/filepath/path_windows_test.go
index 2862f390d0..603b179405 100644
--- a/src/path/filepath/path_windows_test.go
+++ b/src/path/filepath/path_windows_test.go
@@ -13,8 +13,8 @@ import (
"os"
"os/exec"
"path/filepath"
- "reflect"
"runtime/debug"
+ "slices"
"strings"
"testing"
)
@@ -83,7 +83,7 @@ func testWinSplitListTestIsValid(t *testing.T, ti int, tt SplitListTest,
case err != nil:
t.Errorf("%d,%d: execution error %v\n%q", ti, i, err, out)
return
- case !reflect.DeepEqual(out, exp):
+ case !slices.Equal(out, exp):
t.Errorf("%d,%d: expected %#q, got %#q", ti, i, exp, out)
return
default: