Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(585)

Unified Diff: common/errors/walk_test.go

Issue 2963503003: [errors] Greatly simplify common/errors package. (Closed)
Patch Set: fix nits Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « common/errors/walk.go ('k') | common/lhttp/client.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: common/errors/walk_test.go
diff --git a/common/errors/walk_test.go b/common/errors/walk_test.go
index e21e3b88d8d181b65d18a1384bb26b6a302c499f..0834d0883b484dd373d6bbf03bf8c072b85226cb 100644
--- a/common/errors/walk_test.go
+++ b/common/errors/walk_test.go
@@ -66,7 +66,7 @@ func TestAny(t *testing.T) {
for _, err := range []error{
testErr,
MultiError{errors.New("other error"), MultiError{testErr, nil}},
- Annotate(testErr).Reason("error test").Err(),
+ Annotate(testErr, "error test").Err(),
} {
Convey(fmt.Sprintf(`Registers true for %T %v`, err, err), func() {
So(Any(err, filter), ShouldBeTrue)
@@ -74,30 +74,3 @@ func TestAny(t *testing.T) {
}
})
}
-
-func TestContains(t *testing.T) {
- t.Parallel()
-
- Convey(`Testing the Contains function for a sentinel error`, t, func() {
- sentinel := errors.New("test error")
-
- for _, err := range []error{
- nil,
- errors.New("foo"),
- errors.New("test error"),
- } {
- Convey(fmt.Sprintf(`Registers false for %T %v`, err, err), func() {
- So(Contains(err, sentinel), ShouldBeFalse)
- })
- }
-
- for _, err := range []error{
- sentinel,
- MultiError{errors.New("other error"), MultiError{sentinel, nil}},
- } {
- Convey(fmt.Sprintf(`Registers true for %T %v`, err, err), func() {
- So(Contains(err, sentinel), ShouldBeTrue)
- })
- }
- })
-}
« no previous file with comments | « common/errors/walk.go ('k') | common/lhttp/client.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698