Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1745)

Issue 7088044: gm: use new Expectations struct instead of comparison bitmaps (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 8 months ago by epoger
Modified:
11 years, 8 months ago
Reviewers:
EricB, rmistry
CC:
skia-review_googlegroups.com, junov, bungeman, edisonn
Base URL:
http://skia.googlecode.com/svn/trunk/
Visibility:
Public.

Description

gm: use new Expectations struct instead of comparison bitmaps Committed: https://code.google.com/p/skia/source/detail?r=7198

Patch Set 1 #

Total comments: 14

Patch Set 2 : #

Total comments: 4

Patch Set 3 : sync_to_head #

Unified diffs Side-by-side diffs Delta from patch set Stats (+396 lines, -200 lines) Patch
A gm/gm_expectations.h View 1 2 1 chunk +164 lines, -0 lines 0 comments Download
M gm/gmmain.cpp View 1 2 26 chunks +231 lines, -199 lines 0 comments Download
M gm/tests/outputs/compared-against-empty-dir/output-expected/json-summary.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 7
epoger
This will allow us to compare against more complex expectations than one bitmap per test ...
11 years, 8 months ago (2013-01-11 07:58:09 UTC) #1
EricB
https://codereview.appspot.com/7088044/diff/1/gm/gmmain.cpp File gm/gmmain.cpp (right): https://codereview.appspot.com/7088044/diff/1/gm/gmmain.cpp#newcode489 gm/gmmain.cpp:489: } Is there any reason for the Expectations object ...
11 years, 8 months ago (2013-01-11 15:04:06 UTC) #2
epoger
CCing junov, bungeman, edi
11 years, 8 months ago (2013-01-11 17:19:21 UTC) #3
epoger
Thanks, Eric... https://codereview.appspot.com/7088044/diff/1/gm/gmmain.cpp File gm/gmmain.cpp (right): https://codereview.appspot.com/7088044/diff/1/gm/gmmain.cpp#newcode489 gm/gmmain.cpp:489: } On 2013/01/11 15:04:06, EricB wrote: > ...
11 years, 8 months ago (2013-01-11 17:38:54 UTC) #4
EricB
https://codereview.appspot.com/7088044/diff/1/gm/gmmain.cpp File gm/gmmain.cpp (right): https://codereview.appspot.com/7088044/diff/1/gm/gmmain.cpp#newcode489 gm/gmmain.cpp:489: } On 2013/01/11 17:38:54, epoger wrote: > On 2013/01/11 ...
11 years, 8 months ago (2013-01-11 18:39:59 UTC) #5
epoger
https://codereview.appspot.com/7088044/diff/1/gm/tests/outputs/compared-against-empty-dir/output-expected/json-summary.txt File gm/tests/outputs/compared-against-empty-dir/output-expected/json-summary.txt (right): https://codereview.appspot.com/7088044/diff/1/gm/tests/outputs/compared-against-empty-dir/output-expected/json-summary.txt#newcode15 gm/tests/outputs/compared-against-empty-dir/output-expected/json-summary.txt:15: "ignore-failure" : false On 2013/01/11 18:39:59, EricB wrote: > ...
11 years, 8 months ago (2013-01-11 20:20:10 UTC) #6
EricB
11 years, 8 months ago (2013-01-15 15:58:22 UTC) #7
LGTM

https://codereview.appspot.com/7088044/diff/9001/gm/gm_expectations.h
File gm/gm_expectations.h (right):

https://codereview.appspot.com/7088044/diff/9001/gm/gm_expectations.h#newcode95
gm/gm_expectations.h:95: Json::Value allowedChecksumsAsJson() const {
On 2013/01/11 20:20:10, epoger wrote:
> I considered making this return the complete Expectations object in JSON
format
> (both allowedChecksums and ignoreFailures), but to do that I would have to
move
> the kJsonKey_ExpectedResults_* definitions into this file.

I kind of like that idea; it might be nice if gmmain didn't have to know
anything about JSON and could just say "match" or "no match".  Let's wait until
this settles a bit before making that decision though.

https://codereview.appspot.com/7088044/diff/9001/gm/gm_expectations.h#newcode107
gm/gm_expectations.h:107: const SkTArray<Checksum> fAllowedChecksums;
On 2013/01/11 20:20:10, epoger wrote:
> Made the fields private, and added the necessary accessors above.
> 
> I actually think the code was cleaner before, when the information we pulled
out
> of Expectations was exactly what we put into it (just locked up behind a const
> declaration so it is read-only).
> 
> But I will leave it completely up to you, Eric... the old way or the new way? 
> Or some hybrid?

I like this better.  To me, cleaner implies simpler code from the caller's
standpoint, and this delivers that: no direct access of member variables, simple
interface.
Sign in to reply to this message.

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