Chromium Code Reviews
Help | Chromium Project | Sign in
(132)

Issue 2781004: Improve table_row_nsimage_cache_unittest.mm to get 100% code coverage. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
4 years, 11 months ago by Robert Sesek
Modified:
4 years ago
Reviewers:
Nico
CC:
chromium-reviews
Base URL:
http://src.chromium.org/git/chromium.git
Visibility:
Public.

Description

Improve table_row_nsimage_cache_unittest.mm to get 100% code coverage. BUG=32129 TEST=Covered by unit tests. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=49688

Patch Set 1 #

Total comments: 10

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+178 lines, -40 lines) Patch
M chrome/browser/cocoa/table_row_nsimage_cache_unittest.mm View 1 1 chunk +178 lines, -40 lines 0 comments Download
Trybot results:  mac 
Commit: CQ not working?

Messages

Total messages: 3 (0 generated)
Robert Sesek
4 years, 11 months ago (2010-06-09 22:58:50 UTC) #1
Nico
LG If you need stuff to hack on, just ping me… :-) http://codereview.chromium.org/2781004/diff/1/2 File chrome/browser/cocoa/table_row_nsimage_cache_unittest.mm ...
4 years, 11 months ago (2010-06-10 18:26:40 UTC) #2
Robert Sesek
4 years, 11 months ago (2010-06-10 19:10:09 UTC) #3
http://codereview.chromium.org/2781004/diff/1/2
File chrome/browser/cocoa/table_row_nsimage_cache_unittest.mm (right):

http://codereview.chromium.org/2781004/diff/1/2#newcode34
chrome/browser/cocoa/table_row_nsimage_cache_unittest.mm:34:
EXPECT_TRUE(image.allocPixels());
On 2010/06/10 18:26:40, Nico wrote:
> Why not ASSERT? Can the test produce useful results after this fails?

That wasn't compiling for some reason. I think the compiler got confused. It
works now. *shrugs*

http://codereview.chromium.org/2781004/diff/1/2#newcode40
chrome/browser/cocoa/table_row_nsimage_cache_unittest.mm:40: // test output.
On 2010/06/10 18:26:40, Nico wrote:
> Macros: Just say no.

Going to keep this as a macro for the reason that it states: we lose variable
names if this were a function. And those names make it much easier to see what's
failing in the gtest output.

http://codereview.chromium.org/2781004/diff/1/2#newcode101
chrome/browser/cocoa/table_row_nsimage_cache_unittest.mm:101:
rows->insert(rows->begin() + 1, MakeImage(25, 25));
On 2010/06/10 18:26:40, Nico wrote:
> Why not `(*rows)[1] = MakeImage(25, 25);`?

Much better.

http://codereview.chromium.org/2781004/diff/1/2#newcode141
chrome/browser/cocoa/table_row_nsimage_cache_unittest.mm:141:
COMPARE_SK_NS_IMG_SIZES(rows->at(1), image1);
On 2010/06/10 18:26:40, Nico wrote:
> Couldn't/shouldn't you even check the pointers are equal?

Done.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld ec887be