aboutsummaryrefslogtreecommitdiff
path: root/cmp/cmpopts/util_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmp/cmpopts/util_test.go')
-rw-r--r--cmp/cmpopts/util_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmp/cmpopts/util_test.go b/cmp/cmpopts/util_test.go
index c85a282..ed0fbb1 100644
--- a/cmp/cmpopts/util_test.go
+++ b/cmp/cmpopts/util_test.go
@@ -806,7 +806,7 @@ func TestOptions(t *testing.T) {
x: []string{"foo", "Bar", "BAZ"},
y: []string{"Foo", "BAR", "baz"},
opts: []cmp.Option{
- AcyclicTransformer("", func(s string) string { return strings.ToUpper(s) }),
+ AcyclicTransformer("", strings.ToUpper),
},
wantEqual: true,
reason: "equal because of strings.ToUpper; AcyclicTransformer unnecessary, but check this still works",
@@ -815,7 +815,7 @@ func TestOptions(t *testing.T) {
x: "this is a sentence",
y: "this is a sentence",
opts: []cmp.Option{
- AcyclicTransformer("", func(s string) []string { return strings.Fields(s) }),
+ AcyclicTransformer("", strings.Fields),
},
wantEqual: true,
reason: "equal because acyclic transformer splits on any contiguous whitespace",