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

Issue 2111093002: GMock matchers for net::Error (Closed)

Created:
4 years, 5 months ago by Rob Percival
Modified:
4 years, 5 months ago
Reviewers:
eroman
CC:
chromium-reviews, cbentzel+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

GMock matchers for net::Error Provides more informative test failure messages. Committed: https://crrev.com/32886411988498854a43468fe709f634051a1f84 Cr-Commit-Position: refs/heads/master@{#403426}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -0 lines) Patch
M net/test/gtest_util.h View 2 chunks +21 lines, -0 lines 0 comments Download

Messages

Total messages: 17 (5 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2111093002/1
4 years, 5 months ago (2016-06-30 08:50:18 UTC) #2
Rob Percival
PTAL
4 years, 5 months ago (2016-06-30 08:52:33 UTC) #4
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 5 months ago (2016-06-30 09:50:39 UTC) #6
Rob Percival
If you decide that this is worth having, I can also, optionally, create a CL ...
4 years, 5 months ago (2016-06-30 17:22:29 UTC) #7
eroman
LGTM. Sure, I am good with such a refactor! (Ideally I think net::Error would be ...
4 years, 5 months ago (2016-06-30 19:09:23 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2111093002/1
4 years, 5 months ago (2016-07-01 08:22:27 UTC) #10
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 5 months ago (2016-07-01 08:26:19 UTC) #11
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-01 08:26:21 UTC) #12
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/32886411988498854a43468fe709f634051a1f84 Cr-Commit-Position: refs/heads/master@{#403426}
4 years, 5 months ago (2016-07-01 08:28:05 UTC) #14
mmenke
On 2016/07/01 08:28:05, commit-bot: I haz the power wrote: > Patchset 1 (id:??) landed as ...
4 years, 5 months ago (2016-07-11 15:02:27 UTC) #15
eroman
On Mon, Jul 11, 2016 at 8:02 AM, <mmenke@chromium.org> wrote: > On 2016/07/01 08:28:05, commit-bot: ...
4 years, 5 months ago (2016-07-12 19:38:00 UTC) #16
Rob Percival
4 years, 5 months ago (2016-07-14 17:50:06 UTC) #17
Message was sent while issue was closed.
On 2016/07/12 19:38:00, eroman wrote:
> On Mon, Jul 11, 2016 at 8:02 AM, <mailto:mmenke@chromium.org> wrote:
> 
> > On 2016/07/01 08:28:05, commit-bot: I haz the power wrote:
> > > Patchset 1 (id:??) landed as
> > > https://crrev.com/32886411988498854a43468fe709f634051a1f84
> > > Cr-Commit-Position: refs/heads/master@{#403426}
> >
> > Hrm...Eric: Sure this is a good idea? I would have pushed back on this,
> > because of obscurity of the syntax, and because I feel that clear test
> > code is
> > more important than clearer test error messages.
> >
> 
> I can certainly sympathize with that argument.
> 
> My thinking when approving it is that gmock is a dependency elsewhere so
> like it or not developers need to be familiar with it. The IsError() /
> IsOk() still felt readable, although admittedly less writable.
> 
> 
> > https://chromiumcodereview-hr.appspot.com/2111093002/
> >
> 
> -- 
> You received this message because you are subscribed to the Google Groups
> "Chromium-reviews" group.
> To unsubscribe from this group and stop receiving emails from it, send an
email
> to mailto:chromium-reviews+unsubscribe@chromium.org.

There is precedence for this in google3, which has testing::status::StatusIs and
testing::status::IsOk. Plus, gently introducing GMock matchers in this way has
the benefit of making developers aware of their existence and also a bit more
comfortable with more advanced uses of GMock, e.g. the built-in set of matchers
(https://github.com/google/googletest/blob/master/googlemock/docs/CheatSheet.m...)
and mock objects.

Powered by Google App Engine
This is Rietveld 408576698