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

Issue 7031014: Support for better integration between OCMock and gtest. (Closed)

Created:
9 years, 7 months ago by TVL
Modified:
9 years, 7 months ago
CC:
chromium-reviews, pam+watch_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Support for better integration between OCMock and gtest. - Add a chromium method that will use OCMock's verify support, but add any failure to the gtest failure log and return something that can be asserted in the test. - Update the code using OCMock -verify to use the new util. - Remove the OCMock includes in files that weren't actually using it. TEST=none BUG=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=85676

Patch Set 1 #

Total comments: 5

Patch Set 2 : '' #

Total comments: 26

Patch Set 3 : '' #

Total comments: 5

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Total comments: 2

Patch Set 8 : '' #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+121 lines, -43 lines) Patch
M chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller_unittest.mm View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_folder_target_unittest.mm View 1 2 4 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/ui/cocoa/chrome_event_processing_window_unittest.mm View 1 2 4 3 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/find_bar/find_bar_text_field_unittest.mm View 1 chunk +0 lines, -10 lines 0 comments Download
M chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell_unittest.mm View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor_unittest.mm View 1 2 3 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/notifications/balloon_controller_unittest.mm View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/styled_text_field_unittest.mm View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/wrench_menu/menu_tracked_root_view_unittest.mm View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
A third_party/ocmock/gtest_support.h View 1 2 3 4 5 6 7 1 chunk +40 lines, -0 lines 1 comment Download
A third_party/ocmock/gtest_support.mm View 1 2 3 4 5 6 7 1 chunk +36 lines, -0 lines 0 comments Download
M third_party/ocmock/ocmock.gyp View 1 2 1 chunk +28 lines, -20 lines 0 comments Download

Messages

Total messages: 20 (0 generated)
TVL
9 years, 7 months ago (2011-05-16 21:24:46 UTC) #1
TVL
Note: I'm not trilled with the namespace I put this in or the source name. ...
9 years, 7 months ago (2011-05-16 21:26:20 UTC) #2
TVL
And here is what the output ends up looking like: /Users/thomasvl/src/chrome/src/third_party/ocmock/gtest_support.mm:31: Failure Failed Error validating ...
9 years, 7 months ago (2011-05-16 21:29:06 UTC) #3
Robert Sesek
My only concern is discoverability: How are new people writing OCMock tests going to know ...
9 years, 7 months ago (2011-05-16 21:30:44 UTC) #4
TVL
http://codereview.chromium.org/7031014/diff/1/third_party/ocmock/gtest_support.h File third_party/ocmock/gtest_support.h (right): http://codereview.chromium.org/7031014/diff/1/third_party/ocmock/gtest_support.h#newcode17 third_party/ocmock/gtest_support.h:17: // gtest EXECPT_TRUE/ASSERT_TRUE fashion. On 2011/05/16 21:30:44, rsesek wrote: ...
9 years, 7 months ago (2011-05-16 21:34:51 UTC) #5
TVL
On 2011/05/16 21:30:44, rsesek wrote: > My only concern is discoverability: How are new people ...
9 years, 7 months ago (2011-05-16 21:38:47 UTC) #6
Mark Mentovai
http://codereview.chromium.org/7031014/diff/14/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller_unittest.mm File chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller_unittest.mm (right): http://codereview.chromium.org/7031014/diff/14/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller_unittest.mm#newcode1573 chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller_unittest.mm:1573: ASSERT_TRUE(testing::mac::VerifyOCMock(fakeMenu)); You’ve used ASSERT pretty consistently here. Any reason ...
9 years, 7 months ago (2011-05-16 22:16:38 UTC) #7
TVL
Mark - Any opinion on the output format and using defaults to pick up __FILE__, ...
9 years, 7 months ago (2011-05-17 14:57:16 UTC) #8
Robert Sesek
http://codereview.chromium.org/7031014/diff/14/third_party/ocmock/gtest_support.mm File third_party/ocmock/gtest_support.mm (right): http://codereview.chromium.org/7031014/diff/14/third_party/ocmock/gtest_support.mm#newcode31 third_party/ocmock/gtest_support.mm:31: ADD_FAILURE() << "Error validating OCMock: " On 2011/05/17 14:57:16, ...
9 years, 7 months ago (2011-05-17 15:01:15 UTC) #9
Mark Mentovai
What do you mean “using defaults to pick up __FILE__ and __LINE__”. Just based on ...
9 years, 7 months ago (2011-05-17 15:06:16 UTC) #10
Mark Mentovai
http://codereview.chromium.org/7031014/diff/7001/third_party/ocmock/gtest_support.mm File third_party/ocmock/gtest_support.mm (right): http://codereview.chromium.org/7031014/diff/7001/third_party/ocmock/gtest_support.mm#newcode30 third_party/ocmock/gtest_support.mm:30: ADD_FAILURE() << "OCMock call(s) mismatch: " Never mind my ...
9 years, 7 months ago (2011-05-17 15:07:57 UTC) #11
Mark Mentovai
http://codereview.chromium.org/7031014/diff/7001/third_party/ocmock/gtest_support.h File third_party/ocmock/gtest_support.h (right): http://codereview.chromium.org/7031014/diff/7001/third_party/ocmock/gtest_support.h#newcode35 third_party/ocmock/gtest_support.h:35: // Helper macros that looks a little more like ...
9 years, 7 months ago (2011-05-17 15:10:16 UTC) #12
TVL
Mark - is there a better way to deal with getting __FILE__, __LINE__ in there? ...
9 years, 7 months ago (2011-05-17 19:19:38 UTC) #13
Mark Mentovai
thomasvl@chromium.org wrote: > Mark - is there a better way to deal with getting __FILE__, ...
9 years, 7 months ago (2011-05-17 19:23:59 UTC) #14
TVL
On Tue, May 17, 2011 at 3:23 PM, Mark Mentovai <mark@chromium.org> wrote: > thomasvl@chromium.org wrote: ...
9 years, 7 months ago (2011-05-17 19:27:37 UTC) #15
Mark Mentovai
Thomas Van Lenten wrote: > My first attempt was: > bool VerifyOCMock(OCMockObject* mock, const char* ...
9 years, 7 months ago (2011-05-17 19:30:52 UTC) #16
TVL
new diffs up
9 years, 7 months ago (2011-05-17 19:37:08 UTC) #17
Mark Mentovai
LGTM http://codereview.chromium.org/7031014/diff/21/third_party/ocmock/gtest_support.h File third_party/ocmock/gtest_support.h (right): http://codereview.chromium.org/7031014/diff/21/third_party/ocmock/gtest_support.h#newcode15 third_party/ocmock/gtest_support.h:15: } // namespace mac // namespace internal http://codereview.chromium.org/7031014/diff/21/third_party/ocmock/gtest_support.mm ...
9 years, 7 months ago (2011-05-17 19:41:10 UTC) #18
commit-bot: I haz the power
Change committed as 85676
9 years, 7 months ago (2011-05-17 21:09:38 UTC) #19
Mark Mentovai
9 years, 7 months ago (2011-05-17 21:13:59 UTC) #20
http://codereview.chromium.org/7031014/diff/12005/third_party/ocmock/gtest_su...
File third_party/ocmock/gtest_support.h (right):

http://codereview.chromium.org/7031014/diff/12005/third_party/ocmock/gtest_su...
third_party/ocmock/gtest_support.h:15: }  // namespace mac
You didn’t change this to “// namespace internal”.

Powered by Google App Engine
This is Rietveld 408576698