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

Issue 1211283003: Overload EXPECT_NSEQ to handle NSRect. (Closed)

Created:
5 years, 6 months ago by jackhou1
Modified:
5 years, 5 months ago
Reviewers:
Robert Sesek, tapted
CC:
chromium-reviews, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Overload EXPECT_NSEQ to handle NSRect/NSPoint. Previously, the typical pattern is: EXPECT_TRUE(NSEqualRects(expected_rect, actual_rect)); But this does not print useful information upon failure. This CL allows tests to compare NSRects with: EXPECT_NSEQ(expected_rect, actual_rect); which prints the NSRect upon failure. Similarly for NSPoint. BUG=None Committed: https://crrev.com/b22ade8600b7fb6863a197e35b5c0aeeae61d51e Cr-Commit-Position: refs/heads/master@{#336939}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Address comments. #

Patch Set 3 : Include CoreGraphics.h in all files. #

Patch Set 4 : If-def out on IOS. #

Patch Set 5 : Use GTEST_OS_IOS instead of OS_IOS #

Patch Set 6 : If-def out on GTEST_OS_IOS. #

Patch Set 7 : Also handle NSPoint. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+150 lines, -2 lines) Patch
M testing/gtest_mac.h View 1 2 3 4 5 6 1 chunk +34 lines, -2 lines 0 comments Download
M testing/gtest_mac.mm View 1 2 3 4 5 6 1 chunk +64 lines, -0 lines 0 comments Download
M testing/gtest_mac_unittest.mm View 1 2 3 4 5 6 1 chunk +52 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (3 generated)
jackhou1
tapted, PTAL
5 years, 6 months ago (2015-06-26 04:27:57 UTC) #2
tapted
lgtm - seems reasonable, but I'm not too familiar with gtest internals :/. Maybe get ...
5 years, 6 months ago (2015-06-26 06:26:07 UTC) #3
tapted
oh, there's also an ios compile failure. You probably need #if defined(OS_IOS) #include <CoreGraphics/CoreGraphics.h> #endif ...
5 years, 6 months ago (2015-06-26 06:27:59 UTC) #4
jackhou1
> maybe we want to do NSPoint at the same time..? Done. > oh, there's ...
5 years, 5 months ago (2015-06-30 00:33:13 UTC) #5
tapted
+rsesek for a second opinion (since you added the original NSNE) and (copying from https://codereview.chromium.org/1211283003/#msg3 ...
5 years, 5 months ago (2015-06-30 00:50:59 UTC) #7
Robert Sesek
LGTM
5 years, 5 months ago (2015-06-30 21:24:14 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1211283003/120001
5 years, 5 months ago (2015-07-01 00:10:32 UTC) #10
commit-bot: I haz the power
Committed patchset #7 (id:120001)
5 years, 5 months ago (2015-07-01 00:44:49 UTC) #11
commit-bot: I haz the power
5 years, 5 months ago (2015-07-01 00:45:51 UTC) #12
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/b22ade8600b7fb6863a197e35b5c0aeeae61d51e
Cr-Commit-Position: refs/heads/master@{#336939}

Powered by Google App Engine
This is Rietveld 408576698