Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(529)

Issue 10876012: base: Reverse the parameters passed to EXPECT_EQ in ObserverList test. (Closed)

Created:
8 years, 4 months ago by tfarina
Modified:
8 years, 4 months ago
CC:
chromium-reviews, erikwright+watch_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

base: Reverse the parameters passed to EXPECT_EQ in ObserverList test. The order should be (expected, actual). [email protected] Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=152976

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -13 lines) Patch
M base/observer_list_unittest.cc View 4 chunks +13 lines, -13 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
tfarina
TBRing...
8 years, 4 months ago (2012-08-23 01:01:54 UTC) #1
willchan no longer on Chromium
8 years, 4 months ago (2012-08-23 04:35:33 UTC) #2
lgtm


On Wed, Aug 22, 2012 at 6:01 PM, <[email protected]> wrote:

> Reviewers: willchan,
>
> Message:
> TBRing...
>
> Description:
> base: Reverse the parameters passed to EXPECT_EQ in ObserverList test.
>
> The order should be (expected, actual).
>
> [email protected]
>
>
> Please review this at
http://codereview.chromium.**org/10876012/<http://codereview.chromium.org/108...
>
> SVN Base:
svn://svn.chromium.org/chrome/**trunk/src<http://svn.chromium.org/chrome/trunk/src>
>
> Affected files:
>   M base/observer_list_unittest.cc
>
>
> Index: base/observer_list_unittest.cc
> diff --git a/base/observer_list_unittest.**cc
> b/base/observer_list_unittest.**cc
> index 8a8521535c29dfaaece311edea2e1f**54347dbb7a..**
> 53cc9c03e896345dff78a929d348c0**5d7e538358 100644
> --- a/base/observer_list_unittest.**cc
> +++ b/base/observer_list_unittest.**cc
> @@ -201,11 +201,11 @@ TEST(ObserverListTest, BasicTest) {
>
>    FOR_EACH_OBSERVER(Foo, observer_list, Observe(10));
>
> -  EXPECT_EQ(a.total, 20);
> -  EXPECT_EQ(b.total, -20);
> -  EXPECT_EQ(c.total, 0);
> -  EXPECT_EQ(d.total, -10);
> -  EXPECT_EQ(e.total, 0);
> +  EXPECT_EQ(20, a.total);
> +  EXPECT_EQ(-20, b.total);
> +  EXPECT_EQ(0, c.total);
> +  EXPECT_EQ(-10, d.total);
> +  EXPECT_EQ(0, e.total);
>  }
>
>  TEST(**ObserverListThreadSafeTest, BasicTest) {
> @@ -232,10 +232,10 @@ TEST(**ObserverListThreadSafeTest, BasicTest) {
>    observer_list->Notify(&Foo::**Observe, 10);
>    loop.RunAllPending();
>
> -  EXPECT_EQ(a.total, 20);
> -  EXPECT_EQ(b.total, -20);
> -  EXPECT_EQ(c.total, 0);
> -  EXPECT_EQ(d.total, -10);
> +  EXPECT_EQ(20, a.total);
> +  EXPECT_EQ(-20, b.total);
> +  EXPECT_EQ(0, c.total);
> +  EXPECT_EQ(-10, d.total);
>  }
>
>  TEST(**ObserverListThreadSafeTest, RemoveObserver) {
> @@ -255,8 +255,8 @@ TEST(**ObserverListThreadSafeTest, RemoveObserver) {
>    observer_list->Notify(&Foo::**Observe, 10);
>    loop.RunAllPending();
>
> -  EXPECT_EQ(a.total, 0);
> -  EXPECT_EQ(b.total, 0);
> +  EXPECT_EQ(0, a.total);
> +  EXPECT_EQ(0, b.total);
>
>    observer_list->AddObserver(&a)**;
>
> @@ -266,8 +266,8 @@ TEST(**ObserverListThreadSafeTest, RemoveObserver) {
>    observer_list->Notify(&Foo::**Observe, 10);
>    loop.RunAllPending();
>
> -  EXPECT_EQ(a.total, 10);
> -  EXPECT_EQ(b.total, 0);
> +  EXPECT_EQ(10, a.total);
> +  EXPECT_EQ(0, b.total);
>  }
>
>  TEST(**ObserverListThreadSafeTest, WithoutMessageLoop) {
>
>
>

Powered by Google App Engine
This is Rietveld 408576698