aboutsummaryrefslogtreecommitdiff
path: root/src/embed/internal/embedtest
diff options
context:
space:
mode:
authorapocelipes <seve3r@outlook.com>2024-07-24 10:32:31 +0000
committerGopher Robot <gobot@golang.org>2024-07-24 16:44:15 +0000
commit074f2761b5ff54c9c9d2e2a720abd29efa5474cc (patch)
tree66869f736eae2b06e697351ffd59206d6ea91661 /src/embed/internal/embedtest
parentc7ea20195a3415668047eebdc488a4af1f629f04 (diff)
downloadgo-074f2761b5ff54c9c9d2e2a720abd29efa5474cc.tar.xz
crypto/x509,embed: use slices to clean up tests
Replace reflect.DeepEqual with slices.Equal, which is much faster. Change-Id: Ia93cc153d1f71ce92656129843be8dadcefbbca3 GitHub-Last-Rev: 0af0cc4205f51b31780ca2cbefe780e7256b1188 GitHub-Pull-Request: golang/go#67610 Reviewed-on: https://go-review.googlesource.com/c/go/+/587817 Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Roland Shoemaker <roland@golang.org> Commit-Queue: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src/embed/internal/embedtest')
-rw-r--r--src/embed/internal/embedtest/embed_test.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/embed/internal/embedtest/embed_test.go b/src/embed/internal/embedtest/embed_test.go
index a6e673a7bc..875265556f 100644
--- a/src/embed/internal/embedtest/embed_test.go
+++ b/src/embed/internal/embedtest/embed_test.go
@@ -8,6 +8,7 @@ import (
"embed"
"io"
"reflect"
+ "slices"
"testing"
"testing/fstest"
)
@@ -56,7 +57,7 @@ func testDir(t *testing.T, f embed.FS, name string, expect ...string) {
}
names = append(names, name)
}
- if !reflect.DeepEqual(names, expect) {
+ if !slices.Equal(names, expect) {
t.Errorf("readdir %v = %v, want %v", name, names, expect)
}
}