diff options
Diffstat (limited to 'cmp/cmpopts/util_test.go')
-rw-r--r-- | cmp/cmpopts/util_test.go | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/cmp/cmpopts/util_test.go b/cmp/cmpopts/util_test.go index b19bcab..7adeb9b 100644 --- a/cmp/cmpopts/util_test.go +++ b/cmp/cmpopts/util_test.go @@ -17,7 +17,6 @@ import ( "time" "github.com/google/go-cmp/cmp" - "golang.org/x/xerrors" ) type ( @@ -531,14 +530,14 @@ func TestOptions(t *testing.T) { reason: "user-defined EOF is not exactly equal", }, { label: "EquateErrors", - x: xerrors.Errorf("wrapped: %w", io.EOF), + x: fmt.Errorf("wrapped: %w", io.EOF), y: io.EOF, opts: []cmp.Option{EquateErrors()}, wantEqual: true, reason: "wrapped io.EOF is equal according to errors.Is", }, { label: "EquateErrors", - x: xerrors.Errorf("wrapped: %w", io.EOF), + x: fmt.Errorf("wrapped: %w", io.EOF), y: io.EOF, wantEqual: false, reason: "wrapped io.EOF is not equal without EquateErrors option", @@ -585,14 +584,14 @@ func TestOptions(t *testing.T) { reason: "user-defined EOF is not exactly equal", }, { label: "EquateErrors", - x: xerrors.Errorf("wrapped: %w", io.EOF), + x: fmt.Errorf("wrapped: %w", io.EOF), y: io.EOF, opts: []cmp.Option{EquateErrors()}, wantEqual: true, reason: "wrapped io.EOF is equal according to errors.Is", }, { label: "EquateErrors", - x: xerrors.Errorf("wrapped: %w", io.EOF), + x: fmt.Errorf("wrapped: %w", io.EOF), y: io.EOF, wantEqual: false, reason: "wrapped io.EOF is not equal without EquateErrors option", @@ -639,14 +638,14 @@ func TestOptions(t *testing.T) { reason: "user-defined EOF is not exactly equal", }, { label: "EquateErrors", - x: struct{ E error }{xerrors.Errorf("wrapped: %w", io.EOF)}, + x: struct{ E error }{fmt.Errorf("wrapped: %w", io.EOF)}, y: struct{ E error }{io.EOF}, opts: []cmp.Option{EquateErrors()}, wantEqual: true, reason: "wrapped io.EOF is equal according to errors.Is", }, { label: "EquateErrors", - x: struct{ E error }{xerrors.Errorf("wrapped: %w", io.EOF)}, + x: struct{ E error }{fmt.Errorf("wrapped: %w", io.EOF)}, y: struct{ E error }{io.EOF}, wantEqual: false, reason: "wrapped io.EOF is not equal without EquateErrors option", @@ -1073,7 +1072,7 @@ func TestOptions(t *testing.T) { }, { label: "AcyclicTransformer", x: "this is a sentence", - y: "this is a sentence", + y: "this is a sentence", opts: []cmp.Option{ AcyclicTransformer("", strings.Fields), }, |